diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-22 21:26:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-22 21:26:11 +0000 |
commit | e231f2be95092edeb9fdef8644d3703c56656433 (patch) | |
tree | 35170ff1259e003c847a2953bbd4a316ef36f8de /Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm | |
parent | 5b86a262bc6cd64f5fb9f93028dc3e2762361822 (diff) |
latexindent (22aug17)
git-svn-id: svn://tug.org/texlive/trunk@45098 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm')
-rw-r--r-- | Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm index d278d80e75c..d5a751f9e0e 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm @@ -34,15 +34,17 @@ sub construct_special_begin{ # put together a list of the begin terms in special while( my ($specialName,$BeginEnd)= each %{$masterSettings{specialBeginEnd}}){ - # only append the regexps if lookForThis is 1 - $specialBegins .= ($specialBegins eq ""?q():"|").${$BeginEnd}{begin} if(${$BeginEnd}{lookForThis}); + if(ref($BeginEnd) eq "HASH"){ + # only append the regexps if lookForThis is 1 + $specialBegins .= ($specialBegins eq ""?q():"|").${$BeginEnd}{begin} if(${$BeginEnd}{lookForThis}); + } } # put together a list of the begin terms in special while( my ($specialName,$BeginEnd)= each %{$masterSettings{specialBeginEnd}}){ # only append the regexps if lookForThis is 1 - if(${$BeginEnd}{lookForThis}){ + if( (ref($BeginEnd) eq "HASH") and ${$BeginEnd}{lookForThis}){ # the beginning parts $specialBegins .= ($specialBegins eq ""?q():"|").${$BeginEnd}{begin}; @@ -116,10 +118,10 @@ sub find_special{ while( my ($specialName,$BeginEnd)= each %{$masterSettings{specialBeginEnd}}){ # log file - if(${$BeginEnd}{lookForThis}){ + if((ref($BeginEnd) eq "HASH") and ${$BeginEnd}{lookForThis}){ $self->logger("Looking for $specialName",'heading') if $is_t_switch_active ; } else { - $self->logger("Not looking for $specialName (see lookForThis)",'heading') if $is_t_switch_active ; + $self->logger("Not looking for $specialName (see lookForThis)",'heading') if ($is_t_switch_active and (ref($BeginEnd) eq "HASH")); next; } @@ -171,6 +173,19 @@ sub find_special{ } } +sub tasks_particular_to_each_object{ + my $self = shift; + + return unless(${$masterSettings{specialBeginEnd}}{specialBeforeCommand}); + + # search for commands with arguments + $self->find_commands_or_key_equals_values_braces; + + # search for ifElseFi blocks + $self->find_ifelsefi; + +} + sub create_unique_id{ my $self = shift; |