summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-21 21:43:54 +0000
committerKarl Berry <karl@freefriends.org>2021-03-21 21:43:54 +0000
commit37bec1919654a09195f7aa5875ce70b73be4426d (patch)
treebcc1b34ffed51284e480aa36008ce9b56068f221 /Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
parent57a717cd36ed45b6d5fc904dafe4cf1c3ec6bce8 (diff)
latexindent (21mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58596 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm')
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm25
1 files changed, 23 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
index f20e23ca547..50b00ed556f 100755
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/NamedGroupingBracesBrackets.pm
@@ -35,8 +35,29 @@ sub construct_grouping_braces_brackets_regexp{
my $optAndMandRegExp = $self->get_arguments_regexp;
# read from fine tuning
- my $NamedGroupingBracesBracketsRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{name}/;
- my $NamedGroupingFollowRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{follow}/;
+ my $NamedGroupingBracesBracketsRegExp = qr/${${$masterSettings{fineTuning}}{namedGroupingBracesBrackets}}{name}/;
+ my $NamedGroupingFollowRegExp = qr/${${$masterSettings{fineTuning}}{namedGroupingBracesBrackets}}{follow}/;
+
+ # defaultSettings.yaml mistakenly had
+ #
+ # fineTuning:
+ # NamedGroupingBracesBrackets:
+ #
+ # when it should have been
+ #
+ # fineTuning:
+ # namedGroupingBracesBrackets:
+ #
+ # the mistake was mine, so I feel that the following is necessary; if we
+ # get to V4, then this will be removed and only namedGroupingBracesBrackets will be supported
+ if(${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{name}){
+ $logger->warn("*fineTuning:NamedGroupingBracesBrackets is ok for now, but in future versions, fineTuning:namedGroupingBracesBrackets will be used");
+ $NamedGroupingBracesBracketsRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{name}/;
+ }
+ if(${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{follow}){
+ $logger->warn("*fineTuning:NamedGroupingBracesBrackets is ok for now, but in future versions, fineTuning:namedGroupingBracesBrackets will be used");
+ $NamedGroupingFollowRegExp = qr/${${$masterSettings{fineTuning}}{NamedGroupingBracesBrackets}}{follow}/;
+ }
# store the regular expresssion for matching and replacing
$grouping_braces_regexp = qr/