summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-10-30 19:41:07 +0000
committerKarl Berry <karl@freefriends.org>2021-10-30 19:41:07 +0000
commitc82cc412b778aa6a5dae53bfedf2db75821ae2d0 (patch)
treec7cd8e82dd785e67305aac47092b7d7f562c9078 /Master/texmf-dist/scripts
parent60155eae45a3a549f6a366f3d78b5e3749c5bae8 (diff)
latexindent (30oct21)
git-svn-id: svn://tug.org/texlive/trunk@60905 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm29
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/FileContents.pm22
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Verbatim.pm358
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm4
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/defaultSettings.yaml4
-rwxr-xr-xMaster/texmf-dist/scripts/latexindent/latexindent.pl2
6 files changed, 239 insertions, 180 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
index c015e08a871..22de133bf13 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/AlignmentAtAmpersand.pm
@@ -61,23 +61,22 @@ sub find_aligned_block{
(?!<\\)
%
\*
- \h* # possible horizontal spaces
+ \h* # possible horizontal spaces
\\begin\{
- $alignmentBlock # environment name captured into $2
- \} # %* \begin{alignmentBlock} statement
+ ($alignmentBlock) # environment name captured into $2
+ \} # \begin{alignmentBlock} statement captured into $1
)
(
- .*?
+ .*? # non-greedy match (body) into $3
)
- \R
- \h*
+ \R # a line break
+ \h* # possible horizontal spaces
(
(?!<\\)
- %\* # %
- \h* # possible horizontal spaces
- \\end\{$alignmentBlock\} # \end{alignmentBlock}
- ) # %* \end{<something>} statement
- #\R
+ %\* # %
+ \h* # possible horizontal spaces
+ \\end\{\2\} # \end{alignmentBlock} statement captured into $4
+ )
/sx;
while( ${$self}{body} =~ m/$alignmentRegExp/sx){
@@ -87,9 +86,9 @@ sub find_aligned_block{
/
# create a new Environment object
my $alignmentBlockObj = LatexIndent::AlignmentAtAmpersand->new( begin=>$1,
- body=>$2,
- end=>$3,
- name=>$alignmentBlock,
+ body=>$3,
+ end=>$4,
+ name=>$2,
modifyLineBreaksYamlName=>"environments",
linebreaksAtEnd=>{
begin=>1,
@@ -99,7 +98,7 @@ sub find_aligned_block{
);
# log file output
- $logger->trace("*Alignment block found: %*\\begin\{$alignmentBlock\}") if $is_t_switch_active;
+ $logger->trace("*Alignment block found: %*\\begin\{${$alignmentBlock}{name}\}") if $is_t_switch_active;
# the settings and storage of most objects has a lot in common
$self->get_settings_and_store_new_object($alignmentBlockObj);
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/FileContents.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/FileContents.pm
index b18feae6bd9..439e764b312 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/FileContents.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/FileContents.pm
@@ -60,30 +60,30 @@ sub find_file_contents_environments_and_preamble{
my $fileContentsRegExp = qr/
(
\\begin\{
- $fileContentsEnv
- \}
+ ($fileContentsEnv) # environment name captured into $2
+ \} # begin statement captured into $1
)
(
- .*?
+ .*? # non-greedy match (body) into $3
)
(
- \\end\{$fileContentsEnv\}
- \h*
+ \\end\{\2\} # end statement captured into $4
+ \h* # possible horizontal spaces
)
- (\R)?
+ (\R)? # possibly followed by a line break
/sx;
while( ${$self}{body} =~ m/$fileContentsRegExp/sx){
# create a new Environment object
my $fileContentsBlock = LatexIndent::FileContents->new( begin=>$1,
- body=>$2,
- end=>$3,
- name=>$fileContentsEnv,
+ body=>$3,
+ end=>$4,
+ name=>$2,
linebreaksAtEnd=>{
begin=>0,
body=>0,
- end=>$4?1:0,
+ end=>$5?1:0,
},
modifyLineBreaksYamlName=>"filecontents",
);
@@ -112,7 +112,7 @@ sub find_file_contents_environments_and_preamble{
push(@fileContentsStorageArray,$fileContentsBlock);
# log file output
- $logger->trace("FILECONTENTS environment found: $fileContentsEnv")if $is_t_switch_active;
+ $logger->trace("FILECONTENTS environment found: ${$fileContentsEnv}{name}")if $is_t_switch_active;
# remove the environment block, and replace with unique ID
${$self}{body} =~ s/$fileContentsRegExp/${$fileContentsBlock}{replacementText}/sx;
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Verbatim.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Verbatim.pm
index 3abe2e0d46a..0bb41c52272 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/Verbatim.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/Verbatim.pm
@@ -31,31 +31,46 @@ sub find_noindent_block{
my $self = shift;
# noindent block
- $logger->trace('*Searching for NOINDENTBLOCk (see noIndentBlock)') if $is_t_switch_active;
+ $logger->trace('*Searching for NOINDENTBLOCK (see noIndentBlock)') if $is_t_switch_active;
$logger->trace(Dumper(\%{$mainSettings{noIndentBlock}})) if($is_tt_switch_active);
while( my ($noIndentBlock,$yesno)= each %{$mainSettings{noIndentBlock}}){
# integrity check on the field for noIndentBlock
if ( ref($yesno) eq "HASH" ){
- if (not defined ${$yesno}{begin}){
- $logger->trace(" *not* looking for $noIndentBlock as $noIndentBlock:begin not specified") if $is_t_switch_active;
- next;
- } elsif (not defined ${$yesno}{end}) {
- $logger->trace(" *not* looking for $noIndentBlock as $noIndentBlock:end not specified") if $is_t_switch_active;
- next;
- } elsif (defined ${$yesno}{lookForThis} and !${$yesno}{lookForThis}){
- $logger->trace(" *not* looking for $noIndentBlock as lookForThis: 0") if $is_t_switch_active;
- next;
- }
+ if (defined ${$yesno}{lookForThis} and !${$yesno}{lookForThis}){
+ $logger->trace(" *not* looking for $noIndentBlock as lookForThis: 0") if $is_t_switch_active;
+ next;
+ }
+ if (not defined ${$yesno}{name}) {
+ if (not defined ${$yesno}{begin}){
+ $logger->trace(" *not* looking for $noIndentBlock as $noIndentBlock:begin not specified") if $is_t_switch_active;
+ next;
+ } elsif (not defined ${$yesno}{end}) {
+ $logger->trace(" *not* looking for $noIndentBlock as $noIndentBlock:end not specified") if $is_t_switch_active;
+ next;
+ }
+ } elsif (defined ${$yesno}{begin} or defined ${$yesno}{end}){
+ $logger->trace(" *not* looking for $noIndentBlock as $noIndentBlock:name specified with begin and/or end") if $is_t_switch_active;
+ next;
+ }
} elsif( ref($yesno) ne "HASH" and !$yesno ){
- $logger->trace(" *not* looking for $noIndentBlock as $noIndentBlock:$yesno") if $is_t_switch_active;
- next;
+ $logger->trace(" *not* looking for $noIndentBlock as $noIndentBlock:$yesno") if $is_t_switch_active;
+ next;
}
# if we've made it this far, then we're good to go
my $noIndentRegExp;
+ my $noIndentBlockObj;
if (ref($yesno) eq "HASH"){
+ # default value of begin and end
+ if (defined ${$yesno}{name} and not defined ${$yesno}{begin} and not defined ${$yesno}{end}){
+ ${$yesno}{begin} = "\\\\begin\\{(${$yesno}{name})\\}";
+ ${$yesno}{end} = "\\\\end\\{\\2\\}";
+ $logger->trace("looking for regex based $noIndentBlock, name: ${$yesno}{name}") if $is_t_switch_active;
+ $logger->trace("begin not specified for $noIndentBlock, setting default ${$yesno}{begin}") if $is_t_switch_active;
+ $logger->trace("end not specified for $noIndentBlock, setting default ${$yesno}{end}") if $is_t_switch_active;
+ }
# default value of body
if (not defined ${$yesno}{body}){
$logger->trace("looking for regex based $noIndentBlock, begin: ${$yesno}{begin}, end: ${$yesno}{end}") if $is_t_switch_active;
@@ -70,8 +85,8 @@ sub find_noindent_block{
$noIndentRegExp = qr/
(${$yesno}{begin})
- (${$yesno}{body})
- (${$yesno}{end})
+ (${$yesno}{body})
+ (${$yesno}{end})
/sx;
} else {
$logger->trace("looking for $noIndentBlock:$yesno noIndentBlock") if $is_t_switch_active;
@@ -81,32 +96,44 @@ sub find_noindent_block{
(
(?!<\\)
%
- (?:\h|(?!<\\)%)* # possible horizontal spaces
+ (?:\h|(?!<\\)%)* # possible horizontal spaces
\\begin\{
- $noIndentBlockSpec
- \} # % \begin{noindentblock} statement
- ) # begin captured into $1
+ ($noIndentBlockSpec) # environment name captured into $2
+ \} # % \begin{noindentblock} statement
+ ) # begin statement captured into $1
(
- .*?
- ) # non-greedy match (body) into $2
+ .*? # non-greedy match (body) into $3
+ )
(
(?!<\\)
- % # %
- (?:\h|(?!<\\)%)* # possible horizontal spaces
- \\end\{$noIndentBlockSpec\} # \end{noindentblock}
- ) # % \end{<something>} statement into $3
+ % # %
+ (?:\h|(?!<\\)%)* # possible horizontal spaces
+ \\end\{\2\} # % \end{noindentblock} statement
+ ) # end statement captured into $4
/sx;
}
while( ${$self}{body} =~ m/$noIndentRegExp/sx){
# create a new Verbatim object
- my $noIndentBlockObj = LatexIndent::Verbatim->new( begin=>$1,
+ if (ref($yesno) eq "HASH" and not defined ${$yesno}{name}){
+ # user defined begin and end statements
+ $noIndentBlockObj = LatexIndent::Verbatim->new( begin=>$1,
body=>$2,
end=>$3,
name=>$noIndentBlock,
type=>"noindentblock",
modifyLineBreaksYamlName=>"verbatim",
);
+ } else {
+ # specified by name (entry:1 or entry: name: regex)
+ $noIndentBlockObj = LatexIndent::Verbatim->new( begin=>$1,
+ body=>$3,
+ end=>$4,
+ name=>$2,
+ type=>"noindentblock",
+ modifyLineBreaksYamlName=>"verbatim",
+ );
+ }
# give unique id
$noIndentBlockObj->create_unique_id;
@@ -115,7 +142,7 @@ sub find_noindent_block{
$verbatimStorage{${$noIndentBlockObj}{id}}=$noIndentBlockObj;
# log file output
- $logger->trace("NOINDENTBLOCK found: $noIndentBlock") if $is_t_switch_active;
+ $logger->trace("NOINDENTBLOCK found: ${$noIndentBlockObj}{name}") if $is_t_switch_active;
# remove the environment block, and replace with unique ID
${$self}{body} =~ s/$noIndentRegExp/${$noIndentBlockObj}{id}/sx;
@@ -136,67 +163,83 @@ sub find_verbatim_environments{
$logger->trace('*Searching for VERBATIM environments (see verbatimEnvironments)') if $is_t_switch_active;
$logger->trace(Dumper(\%{$mainSettings{verbatimEnvironments}})) if($is_tt_switch_active);
while( my ($verbEnv,$yesno)= each %{$mainSettings{verbatimEnvironments}}){
- if($yesno){
- $logger->trace("looking for $verbEnv:$yesno environments") if $is_t_switch_active;
+ my $verbEnvSpec;
- (my $verbEnvSpec = $verbEnv) =~ s/\*/\\*/sg;
- my $verbatimRegExp = qr/
- (
- \\begin\{
- $verbEnvSpec # environment name captured into $1
- \} # \begin{<something>} statement
- )
- (
- .*?
- ) # any character, but not \\begin
- (
- \\end\{$verbEnvSpec\} # \end{<something>} statement
- )
- (\h*)? # possibly followed by horizontal space
- (\R)? # possibly followed by a line break
- /sx;
-
- while( ${$self}{body} =~ m/$verbatimRegExp/sx){
+ # integrity check on the field for noIndentBlock
+ if ( ref($yesno) eq "HASH" ){
+ if (defined ${$yesno}{lookForThis} and !${$yesno}{lookForThis}){
+ $logger->trace(" *not* looking for $verbEnv as lookForThis: 0") if $is_t_switch_active;
+ next;
+ } elsif (not defined ${$yesno}{name}){
+ $logger->trace(" *not* looking for $verbEnv as $verbEnv:name not specified") if $is_t_switch_active;
+ next;
+ } else {
+ $logger->trace("looking for VERBATIM-environments $verbEnv, name: ${$yesno}{name}") if $is_t_switch_active;
+ $verbEnvSpec = ${$yesno}{name};
+ }
+ } elsif( ref($yesno) ne "HASH" and $yesno ){
+ $logger->trace("looking for $verbEnv:$yesno environments") if $is_t_switch_active;
+ ($verbEnvSpec = $verbEnv) =~ s/\*/\\*/sg;
+ } else {
+ $logger->trace(" *not* looking for $verbEnv as $verbEnv:$yesno") if $is_t_switch_active;
+ next;
+ }
- # create a new Verbatim object
- my $verbatimBlock = LatexIndent::Verbatim->new( begin=>$1,
- body=>$2,
- end=>$3,
- name=>$verbEnv,
- type=>"environment",
- modifyLineBreaksYamlName=>"verbatim",
- linebreaksAtEnd=>{
- end=>$5?1:0,
- },
- horizontalTrailingSpace=>$4?$4:q(),
- aliases=>{
- # begin statements
- BeginStartsOnOwnLine=>"VerbatimBeginStartsOnOwnLine",
- # after end statements
- EndFinishesWithLineBreak=>"VerbatimEndFinishesWithLineBreak",
- },
- );
+ # if we've made it this far, then we're good to go
+ my $verbatimRegExp = qr/
+ (
+ \\begin\{
+ ($verbEnvSpec) # environment name captured into $2
+ \} # \begin{<something>} statement captured into $1
+ )
+ (
+ .*? # non-greedy match (body) into $3
+ ) # any character, but not \\begin
+ (
+ \\end\{\2\} # \end{<something>} statement captured into $4
+ )
+ (\h*)? # possibly followed by horizontal space
+ (\R)? # possibly followed by a line break
+ /sx;
+
+ while( ${$self}{body} =~ m/$verbatimRegExp/sx){
+
+ # create a new Verbatim object
+ my $verbatimBlock = LatexIndent::Verbatim->new( begin=>$1,
+ body=>$3,
+ end=>$4,
+ name=>$2,
+ type=>"environment",
+ modifyLineBreaksYamlName=>"verbatim",
+ linebreaksAtEnd=>{
+ end=>$6?1:0,
+ },
+ horizontalTrailingSpace=>$5?$5:q(),
+ aliases=>{
+ # begin statements
+ BeginStartsOnOwnLine=>"VerbatimBeginStartsOnOwnLine",
+ # after end statements
+ EndFinishesWithLineBreak=>"VerbatimEndFinishesWithLineBreak",
+ },
+ );
- # there are common tasks for each of the verbatim objects
- $verbatimBlock->verbatim_common_tasks;
-
- # verbatim children go in special hash
- $verbatimStorage{${$verbatimBlock}{id}}=$verbatimBlock;
+ # there are common tasks for each of the verbatim objects
+ $verbatimBlock->verbatim_common_tasks;
+
+ # verbatim children go in special hash
+ $verbatimStorage{${$verbatimBlock}{id}}=$verbatimBlock;
- # log file output
- $logger->trace("*VERBATIM environment found: $verbEnv") if $is_t_switch_active;
+ # log file output
+ $logger->trace("*VERBATIM environment found: ${$verbatimBlock}{name}") if $is_t_switch_active;
- # remove the environment block, and replace with unique ID
- ${$self}{body} =~ s/$verbatimRegExp/${$verbatimBlock}{replacementText}/sx;
+ # remove the environment block, and replace with unique ID
+ ${$self}{body} =~ s/$verbatimRegExp/${$verbatimBlock}{replacementText}/sx;
- $logger->trace("replaced with ID: ${$verbatimBlock}{id}") if $is_t_switch_active;
-
- # possible decoration in log file
- $logger->trace(${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace}) if ${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace};
- }
- } else {
- $logger->trace("*not* looking for $verbEnv as $verbEnv:$yesno") if $is_t_switch_active;
- }
+ $logger->trace("replaced with ID: ${$verbatimBlock}{id}") if $is_t_switch_active;
+
+ # possible decoration in log file
+ $logger->trace(${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace}) if ${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace};
+ }
}
return;
}
@@ -212,80 +255,97 @@ sub find_verbatim_commands{
$logger->trace('*Searching for VERBATIM commands (see verbatimCommands)') if $is_t_switch_active;
$logger->trace(Dumper(\%{$mainSettings{verbatimCommands}})) if($is_tt_switch_active);
while( my ($verbCommand,$yesno)= each %{$mainSettings{verbatimCommands}}){
- if($yesno){
- $logger->trace("looking for $verbCommand:$yesno Commands") if $is_t_switch_active;
+ my $verbCommandSpec;
- my $verbatimRegExp = qr/
- (
- \\$verbCommand
- \h*
- ) # name of command into $1
- (
- \[
- (?:
- (?!
- (?:(?<!\\)\[)
- ).
- )*? # not including [, but \[ ok
- (?<!\\) # not immediately pre-ceeded by \
- \] # [optional arguments]
- \h*
- )? # opt arg into $2
- (
- .
- ) # delimiter into $3
- (
- .*?
- ) # body into $4
- \3
- (\h*)? # possibly followed by horizontal space
- (\R)? # possibly followed by a line break
- /mx;
-
- while( ${$self}{body} =~ m/$verbatimRegExp/){
+ # integrity check on the field for noIndentBlock
+ if ( ref($yesno) eq "HASH" ){
+ if (defined ${$yesno}{lookForThis} and !${$yesno}{lookForThis}){
+ $logger->trace(" *not* looking for $verbCommand as lookForThis: 0") if $is_t_switch_active;
+ next;
+ } elsif (not defined ${$yesno}{name}){
+ $logger->trace(" *not* looking for $verbCommand as $verbCommand:name not specified") if $is_t_switch_active;
+ next;
+ } else {
+ $logger->trace("looking for regex based VERBATIM-commands $verbCommand, name: ${$yesno}{name}") if $is_t_switch_active;
+ $verbCommandSpec = ${$yesno}{name};
+ }
+ } elsif( ref($yesno) ne "HASH" and $yesno ){
+ $logger->trace("looking for $verbCommand:$yesno Commands") if $is_t_switch_active;
+ $verbCommandSpec = $verbCommand;
+ } else {
+ $logger->trace("*not* looking for $verbCommand as $verbCommand:$yesno") if $is_t_switch_active;
+ next;
+ }
- # create a new Verbatim object
- my $verbatimCommand = LatexIndent::Verbatim->new( begin=>$1.($2?$2:q()).$3,
- body=>$4,
- end=>$3,
- name=>$verbCommand,
- type=>"command",
- modifyLineBreaksYamlName=>"verbatim",
- linebreaksAtEnd=>{
- end=>$6?1:0,
- },
- horizontalTrailingSpace=>$5?$5:q(),
- aliases=>{
- # begin statements
- BeginStartsOnOwnLine=>"VerbatimBeginStartsOnOwnLine",
- # after end statements
- EndFinishesWithLineBreak=>"VerbatimEndFinishesWithLineBreak",
- },
- optArg=>$2?$2:q(),
- );
- # there are common tasks for each of the verbatim objects
- $verbatimCommand->verbatim_common_tasks;
+ # if we've made it this far, then we're good to go
+ my $verbatimRegExp = qr/
+ (
+ \\($verbCommandSpec) # name of command into $2
+ \h*
+ )
+ (
+ \[
+ (?:
+ (?!
+ (?:(?<!\\)\[)
+ ).
+ )*? # not including [, but \[ ok
+ (?<!\\) # not immediately pre-ceeded by \
+ \] # [optional arguments]
+ \h*
+ )? # opt arg into $3
+ (
+ .
+ ) # delimiter into $4
+ (
+ .*?
+ ) # body into $5
+ \4
+ (\h*)? # possibly followed by horizontal space
+ (\R)? # possibly followed by a line break
+ /mx;
+
+ while( ${$self}{body} =~ m/$verbatimRegExp/){
+
+ # create a new Verbatim object
+ my $verbatimCommand = LatexIndent::Verbatim->new( begin=>$1.($3?$3:q()).$4,
+ body=>$5,
+ end=>$4,
+ name=>$2,
+ type=>"command",
+ modifyLineBreaksYamlName=>"verbatim",
+ linebreaksAtEnd=>{
+ end=>$7?1:0,
+ },
+ horizontalTrailingSpace=>$6?$6:q(),
+ aliases=>{
+ # begin statements
+ BeginStartsOnOwnLine=>"VerbatimBeginStartsOnOwnLine",
+ # after end statements
+ EndFinishesWithLineBreak=>"VerbatimEndFinishesWithLineBreak",
+ },
+ optArg=>$3?$3:q(),
+ );
+ # there are common tasks for each of the verbatim objects
+ $verbatimCommand->verbatim_common_tasks;
- # output, if desired
- $logger->trace(Dumper($verbatimCommand),'ttrace') if($is_tt_switch_active);
+ # output, if desired
+ $logger->trace(Dumper($verbatimCommand),'ttrace') if($is_tt_switch_active);
- # verbatim children go in special hash
- $verbatimStorage{${$verbatimCommand}{id}}=$verbatimCommand;
+ # verbatim children go in special hash
+ $verbatimStorage{${$verbatimCommand}{id}}=$verbatimCommand;
- # log file output
- $logger->trace("*VERBATIM command found: $verbCommand") if $is_t_switch_active;
+ # log file output
+ $logger->trace("*VERBATIM command found: ${$verbatimCommand}{name}") if $is_t_switch_active;
- # remove the environment block, and replace with unique ID
- ${$self}{body} =~ s/$verbatimRegExp/${$verbatimCommand}{replacementText}/sx;
+ # remove the environment block, and replace with unique ID
+ ${$self}{body} =~ s/$verbatimRegExp/${$verbatimCommand}{replacementText}/sx;
- $logger->trace("replaced with ID: ${$verbatimCommand}{id}") if $is_t_switch_active;
-
- # possible decoration in log file
- $logger->trace(${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace}) if ${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace};
- }
- } else {
- $logger->trace("*not* looking for $verbCommand as $verbCommand:$yesno") if $is_t_switch_active;
- }
+ $logger->trace("replaced with ID: ${$verbatimCommand}{id}") if $is_t_switch_active;
+
+ # possible decoration in log file
+ $logger->trace(${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace}) if ${$mainSettings{logFilePreferences}}{showDecorationFinishCodeBlockTrace};
+ }
}
return;
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
index cd4878cbaa3..d25b4f55ab8 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.12';
-our $versionDate = '2021-09-16';
+our $versionNumber = '3.13';
+our $versionDate = '2021-10-30';
1
diff --git a/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml b/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
index fc4be94bc06..01a766633b5 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.12, 2021-09-16
+# defaultSettings.yaml for latexindent.pl, version 3.13, 2021-10-30
# a script that aims to
# beautify .tex, .sty, .cls files
#
@@ -621,7 +621,7 @@ replacements:
-
this: 'latexindent.pl'
that: 'pl.latexindent'
- lookForThis: 1
+ lookForThis: 0
when: before
# fineTuning allows you to tweak the internal pattern matching that
diff --git a/Master/texmf-dist/scripts/latexindent/latexindent.pl b/Master/texmf-dist/scripts/latexindent/latexindent.pl
index e27a8be07b7..5ba1535efa1 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.12, 2021-09-16
+# latexindent.pl, version 3.13, 2021-10-30
#
# 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