texlive[67531] trunk: latexindent (2jul23)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 2 22:17:33 CEST 2023


Revision: 67531
          http://tug.org/svn/texlive?view=revision&revision=67531
Author:   karl
Date:     2023-07-02 22:17:33 +0200 (Sun, 02 Jul 2023)
Log Message:
-----------
latexindent (2jul23)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl
    trunk/Master/bin/windows/latexindent.exe
    trunk/Master/texmf-dist/doc/support/latexindent/README
    trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
    trunk/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
    trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
    trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm
    trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
    trunk/Master/texmf-dist/scripts/latexindent/latexindent.pl

Modified: trunk/Build/source/texk/texlive/linked_scripts/latexindent/latexindent.pl
===================================================================
(Binary files differ)

Modified: trunk/Master/bin/windows/latexindent.exe
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/latexindent/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/README	2023-07-02 20:17:15 UTC (rev 67530)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README	2023-07-02 20:17:33 UTC (rev 67531)
@@ -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.

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2023-07-02 20:17:15 UTC (rev 67530)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json	2023-07-02 20:17:33 UTC (rev 67531)
@@ -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": {

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex	2023-07-02 20:17:15 UTC (rev 67530)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent.tex	2023-07-02 20:17:33 UTC (rev 67531)
@@ -1093,15 +1093,15 @@
 
  % \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}

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2023-07-02 20:17:15 UTC (rev 67530)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm	2023-07-02 20:17:33 UTC (rev 67531)
@@ -20,6 +20,6 @@
 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

Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm	2023-07-02 20:17:15 UTC (rev 67530)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Wrap.pm	2023-07-02 20:17:33 UTC (rev 67531)
@@ -63,7 +63,7 @@
                         /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 @@
             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 @@
     }
 
     # 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 @@
                 $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 @@
                     else {
                         my $thingToMeasure = ( split( /\R/, $textWrapBlockStorage[ $textWrapBlockCount - 1 ] ) )[-1];
                         $thingToMeasure =~ s/$tokens{blanklines}//;
+                        $thingToMeasure =~ s/$tokens{verbatim}//;
+                        $thingToMeasure =~ s/$trailingCommentRegExp//;
 
                         $subsequentSpace = (
                             $textWrapBlockCount == 0

Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2023-07-02 20:17:15 UTC (rev 67530)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml	2023-07-02 20:17:33 UTC (rev 67531)
@@ -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
 # 

Modified: trunk/Master/texmf-dist/scripts/latexindent/latexindent.pl
===================================================================
(Binary files differ)



More information about the tex-live-commits mailing list.