summaryrefslogtreecommitdiff
path: root/support/latexindent/latexindent.pl
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-26 03:00:32 +0000
committerNorbert Preining <norbert@preining.info>2022-03-26 03:00:32 +0000
commitc441617a2cd82c0b0907d0106dbf047987ffd97d (patch)
tree6e98859c2dabc00a6413a5f217b93a2f9b902dfa /support/latexindent/latexindent.pl
parentd636f5360c4ea795ed5560ea0a7524da61c01491 (diff)
CTAN sync 202203260300
Diffstat (limited to 'support/latexindent/latexindent.pl')
-rwxr-xr-xsupport/latexindent/latexindent.pl11
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);