summaryrefslogtreecommitdiff
path: root/support/latexindent
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-03 03:03:09 +0000
committerNorbert Preining <norbert@preining.info>2023-07-03 03:03:09 +0000
commit4b749d92c46780575d3bd3dd7544030300a51301 (patch)
tree2a54f14daad34faa52cd6fbbd4cbdd61ba0be992 /support/latexindent
parentbf144b430967ee6534dac2d3aefb8d562f27bf46 (diff)
CTAN sync 202307030303
Diffstat (limited to 'support/latexindent')
-rw-r--r--support/latexindent/LatexIndent/Version.pm4
-rw-r--r--support/latexindent/LatexIndent/Wrap.pm16
-rw-r--r--support/latexindent/README2
-rw-r--r--support/latexindent/bin/linux/latexindentbin6165486 -> 6165688 bytes
-rw-r--r--support/latexindent/bin/macos/latexindentbin6394708 -> 6394914 bytes
-rw-r--r--support/latexindent/defaultSettings.yaml2
-rw-r--r--support/latexindent/documentation/latexindent-yaml-schema.json2
-rw-r--r--support/latexindent/documentation/latexindent.pdfbin1250364 -> 1250154 bytes
-rw-r--r--support/latexindent/documentation/latexindent.tex18
-rwxr-xr-xsupport/latexindent/latexindent.pl2
10 files changed, 27 insertions, 19 deletions
diff --git a/support/latexindent/LatexIndent/Version.pm b/support/latexindent/LatexIndent/Version.pm
index f7ed57cf8d..ae69bb7928 100644
--- a/support/latexindent/LatexIndent/Version.pm
+++ b/support/latexindent/LatexIndent/Version.pm
@@ -20,6 +20,6 @@ use warnings;
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;
-our $versionNumber = '3.22';
-our $versionDate = '2023-06-01';
+our $versionNumber = '3.22.1';
+our $versionDate = '2023-07-02';
1
diff --git a/support/latexindent/LatexIndent/Wrap.pm b/support/latexindent/LatexIndent/Wrap.pm
index dc99170452..c600d28e18 100644
--- a/support/latexindent/LatexIndent/Wrap.pm
+++ b/support/latexindent/LatexIndent/Wrap.pm
@@ -63,7 +63,7 @@ sub text_wrap {
/sx;
}
elsif ( $blocksFollowEachPart eq "commentOnPreviousLine" ) {
- $blocksFollowEachPart = qr/^$trailingCommentRegExp/m;
+ $blocksFollowEachPart = qr/(?:^\h*$trailingCommentRegExp\R?)+/m;
}
elsif ( $blocksFollowEachPart eq "verbatim" ) {
$blocksFollowEachPart = qr/$tokens{verbatim}\d+$tokens{endOfToken}/;
@@ -103,7 +103,7 @@ sub text_wrap {
elsif ( $blocksFollowEachPart eq "other" ) {
$blocksFollowEachPart = qr/$yesNo/x;
}
- $blocksFollow .= ( $blocksFollow eq '' ? q() : "|" ) . qr/$blocksFollowEachPart/sx;
+ $blocksFollow .= ( $blocksFollow eq '' ? q() : "|" ) . qr/$blocksFollowEachPart/s;
}
}
@@ -118,7 +118,13 @@ sub text_wrap {
}
# followed by 0 or more h-space and line breaks
- $blocksFollow = ( $blocksFollow eq '' ? q() : qr/(?:$blocksFollow)(?:\h|\R)*/sx );
+ if ( ${ ${ $mainSettings{modifyLineBreaks}{textWrapOptions} }{blocksFollow} }{commentOnPreviousLine} ) {
+ $blocksFollow
+ = ( $blocksFollow eq '' ? q() : qr/(?:$blocksFollow)(?:\h|\R)*(?:$trailingCommentRegExp\R\h*)?/s );
+ }
+ else {
+ $blocksFollow = ( $blocksFollow eq '' ? q() : qr/(?:$blocksFollow)(?:\h|\R)*/s );
+ }
$logger->trace("textWrap blocks follow regexp:")
if ( $is_tt_switch_active and ${$self}{modifyLineBreaksYamlName} ne 'sentence' );
@@ -181,7 +187,7 @@ sub text_wrap {
$logger->trace(
"textWrap Blocks ENDS with commentOnOwnLine (see textWrap:blocksEndBefore:commentOnOwnLine)")
if $is_t_switch_active;
- $blocksEndBeforeEachPart = qr/^$trailingCommentRegExp/m;
+ $blocksEndBeforeEachPart = qr/^\h*$trailingCommentRegExp/m;
}
elsif ( $blocksEndBeforeEachPart eq "verbatim" ) {
$logger->trace("textWrap Blocks ENDS with verbatim (see textWrap:blocksEndBefore:verbatim)")
@@ -326,6 +332,8 @@ sub text_wrap {
else {
my $thingToMeasure = ( split( /\R/, $textWrapBlockStorage[ $textWrapBlockCount - 1 ] ) )[-1];
$thingToMeasure =~ s/$tokens{blanklines}//;
+ $thingToMeasure =~ s/$tokens{verbatim}//;
+ $thingToMeasure =~ s/$trailingCommentRegExp//;
$subsequentSpace = (
$textWrapBlockCount == 0
diff --git a/support/latexindent/README b/support/latexindent/README
index df74dc160c..5bda1fba77 100644
--- a/support/latexindent/README
+++ b/support/latexindent/README
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- latexindent.pl, version 3.22, 2023-06-01
+ latexindent.pl, version 3.22.1, 2023-07-02
PERL script to indent code within environments, and align delimited
environments in .tex files.
diff --git a/support/latexindent/bin/linux/latexindent b/support/latexindent/bin/linux/latexindent
index a41e6ae191..a623550012 100644
--- a/support/latexindent/bin/linux/latexindent
+++ b/support/latexindent/bin/linux/latexindent
Binary files differ
diff --git a/support/latexindent/bin/macos/latexindent b/support/latexindent/bin/macos/latexindent
index acc4fe2571..fa59cb69b7 100644
--- a/support/latexindent/bin/macos/latexindent
+++ b/support/latexindent/bin/macos/latexindent
Binary files differ
diff --git a/support/latexindent/defaultSettings.yaml b/support/latexindent/defaultSettings.yaml
index 9d16992e36..e626458b63 100644
--- a/support/latexindent/defaultSettings.yaml
+++ b/support/latexindent/defaultSettings.yaml
@@ -1,5 +1,5 @@
#
-# latexindent.pl, version 3.22, 2023-06-01
+# latexindent.pl, version 3.22.1, 2023-07-02
#
# defaultSettings.yaml, the default settings for latexindent.pl
#
diff --git a/support/latexindent/documentation/latexindent-yaml-schema.json b/support/latexindent/documentation/latexindent-yaml-schema.json
index cf707723a9..003c26d545 100644
--- a/support/latexindent/documentation/latexindent-yaml-schema.json
+++ b/support/latexindent/documentation/latexindent-yaml-schema.json
@@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/schema",
"$id": "latexindent-yaml-schema.json",
"title": "latexindent.pl YAML schema",
- "description": "latexindent.pl YAML schema helper, V3.22 2023-06-01",
+ "description": "latexindent.pl YAML schema helper, V3.22.1 2023-07-02",
"type": "object",
"properties": {
"fileExtensionPreference": {
diff --git a/support/latexindent/documentation/latexindent.pdf b/support/latexindent/documentation/latexindent.pdf
index fb04afb06c..b8e3cab83b 100644
--- a/support/latexindent/documentation/latexindent.pdf
+++ b/support/latexindent/documentation/latexindent.pdf
Binary files differ
diff --git a/support/latexindent/documentation/latexindent.tex b/support/latexindent/documentation/latexindent.tex
index 70c2be9805..b74e1eee32 100644
--- a/support/latexindent/documentation/latexindent.tex
+++ b/support/latexindent/documentation/latexindent.tex
@@ -1093,15 +1093,15 @@ perl latexindent-module-installer.pl
% \begin{latexonly}
You will occasionally see dates shown in the margin (for example, next to this
- paragraph!) \announce{2017-06-25}{announce} which detail the date of the version in which
- the feature was implemented; the `N' stands for `new as of the date shown' and `U' stands
- for `updated as of the date shown'. If you see \stardemo, it means that the feature is
- either new (N) or updated (U) as of the release of the current version; if you see
- \stardemo\, attached to a listing, then it means that listing is new (N) or updated (U)
- as of the current version. If you have not read this document before (and even if you
- have!), then you can ignore every occurrence of the \stardemo; they are simply there to
- highlight new and updated features. The new and updated features in this documentation
- (\gitRel) are on the following pages: \listOfNewFeatures% % \end{latexonly}
+ paragraph!) \announce{2017-06-25}{announce} which detail the date of the version in
+ which the feature was implemented; the `N' stands for `new as of the date shown' and `U'
+ stands for `updated as of the date shown'. If you see \stardemo, it means that the
+ feature is either new (N) or updated (U) as of the release of the current version; if
+ you see \stardemo\, attached to a listing, then it means that listing is new (N) or
+ updated (U) as of the current version. If you have not read this document before (and
+ even if you have!), then you can ignore every occurrence of the \stardemo; they are
+ simply there to highlight new and updated features. The new and updated features in this
+ documentation (\gitRel) are on the following pages: \listOfNewFeatures% % \end{latexonly}
\subsection{A word about regular expressions}
\index{regular expressions!a word about}
diff --git a/support/latexindent/latexindent.pl b/support/latexindent/latexindent.pl
index 5dacf0bc84..a4cf71ab95 100755
--- a/support/latexindent/latexindent.pl
+++ b/support/latexindent/latexindent.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# latexindent.pl, version 3.22, 2023-06-01
+# latexindent.pl, version 3.22.1, 2023-07-02
#
# 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