diff options
Diffstat (limited to 'support/latexindent/latexindent.pl')
-rwxr-xr-x | support/latexindent/latexindent.pl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/support/latexindent/latexindent.pl b/support/latexindent/latexindent.pl index 70edb2f4a7..09134e9624 100755 --- a/support/latexindent/latexindent.pl +++ b/support/latexindent/latexindent.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# latexindent.pl, version 3.16, 2022-03-13 +# latexindent.pl, version 3.17, 2022-03-25 # # 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 @@ -39,6 +39,7 @@ GetOptions ( "yaml|y=s"=>\$switches{yaml}, "onlydefault|d"=>\$switches{onlyDefault}, "overwrite|w"=>\$switches{overwrite}, + "overwriteIfDifferent|wd"=>\$switches{overwriteIfDifferent}, "outputfile|o=s"=>\$switches{outputToFile}, "modifylinebreaks|m"=>\$switches{modifyLineBreaks}, "logfile|g=s"=>\$switches{logFileName}, @@ -51,8 +52,12 @@ GetOptions ( "check|k"=>\$switches{check}, "checkv|kv"=>\$switches{checkverbose}, "lines|n=s"=>\$switches{lines}, + "GCString"=>\$switches{GCString}, ); +# conditionally load the GCString module +eval "use Unicode::GCString" if $switches{GCString}; + # check local settings doesn't interfer with reading the file; # this can happen if the script is called as follows: # @@ -71,6 +76,6 @@ if($switches{readLocalSettings} and scalar(@ARGV) < 1) { # allow STDIN as input, if a filename is not present unshift( @ARGV, '-' ) unless @ARGV; -my $document = bless ({name=>"mainDocument",modifyLineBreaksYamlName=>"mainDocument",fileName=>$ARGV[0],switches=>\%switches},"LatexIndent::Document"); -$document->latexindent; +my $document = bless ({name=>"mainDocument",modifyLineBreaksYamlName=>"mainDocument",switches=>\%switches},"LatexIndent::Document"); +$document->latexindent( \@ARGV ); exit(0); |