summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-03-13 20:50:20 +0000
committerKarl Berry <karl@freefriends.org>2022-03-13 20:50:20 +0000
commita0fa10fa8cbb6079d678193d1a6df01bbc9c957b (patch)
tree81eeebd7f12fb5c006f5e93da8ea64d02b3f4d89 /Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm
parenta370b71536d38cec18c7baf3908c2bbaa83e1a0d (diff)
latexindent (13mar22)
git-svn-id: svn://tug.org/texlive/trunk@62690 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm')
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm
index a3e439d2e0d..b1a3cee40dd 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/BlankLines.pm
@@ -83,7 +83,11 @@ sub unprotect_blank_lines{
${$self}{body} =~ s/^\h*\R//mg;
$logger->trace("Unprotecting blank lines (see preserveBlankLines)") if $is_t_switch_active;
- my $blankLineToken = join("(?:\\h|\\R)*",split(//,$tokens{blanklines}));
+ my $blankLineToken = $tokens{blanklines};
+
+ if($is_m_switch_active and ${$mainSettings{modifyLineBreaks}{textWrapOptions}}{huge} ne "overflow"){
+ $blankLineToken = join("(?:\\h|\\R)*",split(//,$tokens{blanklines}));
+ }
# loop through the body, looking for the blank line token
while(${$self}{body} =~ m/$blankLineToken/s){