diff options
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/DoubleBackSlash.pm')
-rw-r--r-- | Master/texmf-dist/scripts/latexindent/LatexIndent/DoubleBackSlash.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/DoubleBackSlash.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/DoubleBackSlash.pm index 8b8be3e25ec..1c483b68655 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/DoubleBackSlash.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/DoubleBackSlash.pm @@ -1,4 +1,5 @@ package LatexIndent::DoubleBackSlash; + # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or @@ -25,9 +26,9 @@ our @EXPORT_OK = qw/dodge_double_backslash un_dodge_double_backslash/; # cycle list={blue,mark=none\\}, # see test-cases/texexchange/29293-christian-feuersanger.tex # -# This is problematic, as the argument regexp won't count the right } because it has a +# This is problematic, as the argument regexp won't count the right } because it has a # backslash immediately infront of it! -sub dodge_double_backslash{ +sub dodge_double_backslash { my $self = shift; ${$self}{body} =~ s/(?:\\\\(\{|\}|\]))/$tokens{doubleBackSlash}$1/sg; @@ -35,7 +36,7 @@ sub dodge_double_backslash{ } # this routine replaces the token with the \\\\ -sub un_dodge_double_backslash{ +sub un_dodge_double_backslash { my $self = shift; ${$self}{body} =~ s/$tokens{doubleBackSlash}/\\\\/sg; |