diff options
author | Norbert Preining <norbert@preining.info> | 2020-11-07 03:00:56 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-11-07 03:00:56 +0000 |
commit | ec3426946c37f270d71e8c4ad19d37beea726e7d (patch) | |
tree | 4f9a4ffaa8d056d3d160ba1be76408a2e20d6fb7 /support/latexindent/LatexIndent/ModifyLineBreaks.pm | |
parent | ac4210da60306c356c4f9344b65e1f8345314267 (diff) |
CTAN sync 202011070300
Diffstat (limited to 'support/latexindent/LatexIndent/ModifyLineBreaks.pm')
-rw-r--r-- | support/latexindent/LatexIndent/ModifyLineBreaks.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/support/latexindent/LatexIndent/ModifyLineBreaks.pm b/support/latexindent/LatexIndent/ModifyLineBreaks.pm index de630a584b..8b00c52272 100644 --- a/support/latexindent/LatexIndent/ModifyLineBreaks.pm +++ b/support/latexindent/LatexIndent/ModifyLineBreaks.pm @@ -168,7 +168,7 @@ sub modify_line_breaks_end{ # possibly modify line break *after* \end{statement} if(defined $_ and $_>=1 - and !${$self}{linebreaksAtEnd}{end}){ + and !${$self}{linebreaksAtEnd}{end} and ${$self}{end} ne ''){ # if the <end> statement doesn't finish with a line break, # then we have different actions based upon the value of EndFinishesWithLineBreak: # EndFinishesWithLineBreak == 1 just add a new line @@ -187,7 +187,7 @@ sub modify_line_breaks_end{ $logger->trace("Even though $EndStringLogFile == 2, ${$self}{end} is immediately followed by a %, so not adding another; not adding line break.") if $is_t_switch_active; } else { # otherwise, create a trailing comment, and tack it on - $logger->trace("Adding a % immediately after, ${$self}{end} ($EndStringLogFile==2)") if $is_t_switch_active; + $logger->trace("Adding a % immediately after ${$self}{end} ($EndStringLogFile==2)") if $is_t_switch_active; my $trailingCommentToken = "%".$self->add_comment_symbol; ${$self}{end} =~ s/\h*$//s; ${$self}{replacementText} .= "$trailingCommentToken\n"; @@ -312,6 +312,8 @@ sub text_wrap{ } $Text::Wrap::huge = ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{huge} if ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{huge}; $Text::Wrap::break = ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{break} if ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{break}; + $Text::Wrap::unexpand = ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{unexpand} if ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{unexpand}; + $Text::Wrap::tabstop = ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{tabstop} if ${$masterSettings{modifyLineBreaks}{textWrapOptions}}{tabstop}; ${$self}{body} = wrap('','',${$self}{body}); } |