diff options
author | Karl Berry <karl@freefriends.org> | 2023-06-06 20:06:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-06-06 20:06:48 +0000 |
commit | 04943edfd3de2e24289b7ca55a8e6acd2e382713 (patch) | |
tree | 108c1cc779b9d17b993dc54a4841b64ee3388cd1 /Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm | |
parent | bbc32e66e576afcab77c6432dda3790951c35198 (diff) |
latexindent (6jun23)
git-svn-id: svn://tug.org/texlive/trunk@67296 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm')
-rw-r--r-- | Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm index bbae745d940..748d005f98e 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/TrailingComments.pm @@ -67,16 +67,16 @@ sub remove_trailing_comments { $logger->trace("*Storing trailing comments") if $is_t_switch_active; my $notPreceededBy = qr/${${$mainSettings{fineTuning}}{trailingComments}}{notPreceededBy}/; + my $afterComment = qr/${${$mainSettings{fineTuning}}{trailingComments}}{afterComment}/; # perform the substitution ${$self}{body} =~ s/ - $notPreceededBy # not preceded by a \ - % # % + $notPreceededBy # not preceded by a \ + % # % ( - \h*? # followed by possible horizontal space - .*? # and anything else + $afterComment # anything else ) - $ # up to the end of a line + $ # up to the end of a line / # increment comment counter and store comment $commentCounter++; |