summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-08 22:10:31 +0000
committerKarl Berry <karl@freefriends.org>2018-06-08 22:10:31 +0000
commited97aa4d4d77a6cb020570b4502db91b233f4fb2 (patch)
tree6db5db41a0c71dbaed96a2e83095e551d3741984 /Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm
parent9b33ad18278c204e27ce93e5f43d292a325df899 (diff)
latexindent (9jun18)
git-svn-id: svn://tug.org/texlive/trunk@47964 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.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm
index 45dd4c3ec16..aa17f24df13 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Special.pm
@@ -21,14 +21,17 @@ use LatexIndent::TrailingComments qw/$trailingCommentRegExp/;
use LatexIndent::GetYamlSettings qw/%masterSettings/;
use LatexIndent::Switches qw/$is_t_switch_active $is_tt_switch_active/;
use LatexIndent::LogFile qw/$logger/;
+use LatexIndent::IfElseFi qw/$ifElseFiBasicRegExp/;
use Data::Dumper;
use Exporter qw/import/;
our @ISA = "LatexIndent::Document"; # class inheritance, Programming Perl, pg 321
-our @EXPORT_OK = qw/find_special construct_special_begin/;
+our @EXPORT_OK = qw/find_special construct_special_begin $specialBeginAndBracesBracketsBasicRegExp $specialBeginBasicRegExp/;
our $specialCounter;
our $specialBegins = q();
our $specialAllMatchesRegExp = q();
our %individualSpecialRegExps;
+our $specialBeginAndBracesBracketsBasicRegExp;
+our $specialBeginBasicRegExp;
sub construct_special_begin{
my $self = shift;
@@ -102,6 +105,10 @@ sub construct_special_begin{
$logger->trace("*The overall special regexp is: (see specialBeginEnd)") if $is_tt_switch_active;
$logger->trace($specialAllMatchesRegExp) if $is_tt_switch_active;
+ # basic special begin regexp
+ $specialBeginBasicRegExp = qr/$specialBegins/;
+ $specialBeginAndBracesBracketsBasicRegExp = $specialBegins."|\\{|\\[";
+ $specialBeginAndBracesBracketsBasicRegExp = qr/$specialBeginAndBracesBracketsBasicRegExp/;
}
sub find_special{