diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-29 21:34:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-29 21:34:30 +0000 |
commit | b2212339efc3d351af4ae34bc1bec1f07d9938fd (patch) | |
tree | 218cdc41790e7e7f5fe0b0f05d68b54888a89ed2 /Master/texmf-dist/scripts/latexindent/LatexIndent | |
parent | 2c8d23277ab1b87ca0587580f1b3a2f12ddb5a07 (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/LatexIndent')
-rw-r--r-- | Master/texmf-dist/scripts/latexindent/LatexIndent/HorizontalWhiteSpace.pm | 17 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm | 4 |
2 files changed, 19 insertions, 2 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 |