summaryrefslogtreecommitdiff
path: root/support/latexindent/LatexIndent/BlankLines.pm
diff options
context:
space:
mode:
Diffstat (limited to 'support/latexindent/LatexIndent/BlankLines.pm')
-rw-r--r--support/latexindent/LatexIndent/BlankLines.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/support/latexindent/LatexIndent/BlankLines.pm b/support/latexindent/LatexIndent/BlankLines.pm
index a3e439d2e0..b1a3cee40d 100644
--- a/support/latexindent/LatexIndent/BlankLines.pm
+++ b/support/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){