summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-29 21:34:30 +0000
committerKarl Berry <karl@freefriends.org>2017-06-29 21:34:30 +0000
commitb2212339efc3d351af4ae34bc1bec1f07d9938fd (patch)
tree218cdc41790e7e7f5fe0b0f05d68b54888a89ed2 /Master/texmf-dist/scripts/latexindent
parent2c8d23277ab1b87ca0587580f1b3a2f12ddb5a07 (diff)
latexindent (29jun17)
git-svn-id: svn://tug.org/texlive/trunk@44726 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent')
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm17
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm4
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/defaultSettings.yaml2
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/latexindent.pl2
4 files changed, 21 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm
index 360a8077022..09e96ecc879 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm
@@ -25,6 +25,23 @@ sub remove_trailing_whitespace{
my $self = shift;
my %input = @_;
+ # removeTrailingWhitespace can be either a hash or a scalar, but if
+ # it's a scalar, we need to fix it
+ if(ref($masterSettings{removeTrailingWhitespace}) ne 'HASH'){
+ $self->logger("removeTrailingWhitespace specified as scalar, will update it to be a hash",'heading') if $is_t_switch_active;
+ # grab the value
+ my $removeTWS = $masterSettings{removeTrailingWhitespace};
+
+ # delete the scalar
+ delete $masterSettings{removeTrailingWhitespace};
+
+ # redefine it as a hash
+ ${$masterSettings{removeTrailingWhitespace}}{beforeProcessing} = $removeTWS;
+ ${$masterSettings{removeTrailingWhitespace}}{afterProcessing} = $removeTWS;
+ $self->logger("removeTrailingWhitespace: beforeProcessing is now $removeTWS") if $is_t_switch_active;
+ $self->logger("removeTrailingWhitespace: afterProcessing is now $removeTWS") if $is_t_switch_active;
+ }
+
# this method can be called before the indendation, and after, depending upon the input
if($input{when} eq "before"){
return unless(${$masterSettings{removeTrailingWhitespace}}{beforeProcessing});
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
index 1ebfb27171e..ec7202cf3eb 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
@@ -19,6 +19,6 @@ use warnings;
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;
-our $versionNumber = '3.2.1';
-our $versionDate = '2017-06-25';
+our $versionNumber = '3.2.2';
+our $versionDate = '2017-06-28';
1
diff --git a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
index d29c887f2da..d91ee50010e 100755
--- a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
+++ b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
@@ -1,4 +1,4 @@
-# defaultSettings.yaml for latexindent.pl, version 3.2.1, 2017-06-25
+# defaultSettings.yaml for latexindent.pl, version 3.2.2, 2017-06-28
# a script that aims to
# beautify .tex, .sty, .cls files
#
diff --git a/Master/texmf-dist/scripts/latexindent/latexindent.pl b/Master/texmf-dist/scripts/latexindent/latexindent.pl
index e4fc3ea64f6..bafa1790e46 100755
--- a/Master/texmf-dist/scripts/latexindent/latexindent.pl
+++ b/Master/texmf-dist/scripts/latexindent/latexindent.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# latexindent.pl, version 3.2.1, 2017-06-25
+# latexindent.pl, version 3.2.2, 2017-06-28
#
# 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