texlive[66794] trunk: latexindent (7apr23)
commits+karl at tug.org
commits+karl at tug.org
Fri Apr 7 22:53:36 CEST 2023
Revision: 66794
http://tug.org/svn/texlive?view=revision&revision=66794
Author: karl
Date: 2023-04-07 22:53:36 +0200 (Fri, 07 Apr 2023)
Log Message:
-----------
latexindent (7apr23)
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/contributors.bib
trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
trunk/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Item.pm
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.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-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/doc/support/latexindent/README 2023-04-07 20:53:36 UTC (rev 66794)
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- latexindent.pl, version 3.20.4, 2023-03-15
+ latexindent.pl, version 3.20.5, 2023-04-07
PERL script to indent code within environments, and align delimited
environments in .tex files.
Modified: trunk/Master/texmf-dist/doc/support/latexindent/contributors.bib
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/contributors.bib 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/doc/support/latexindent/contributors.bib 2023-04-07 20:53:36 UTC (rev 66794)
@@ -192,3 +192,11 @@
author = "Henrik Sloot",
urldate = {2023-02-15},
keywords = {contributor},}
+
+ at online{valtterikantanen,
+ title = "fix: decode the name of the backup file",
+ url = "https://github.com/cmhughes/latexindent.pl/pull/439",
+ date = {2023-04-07},
+ author = "valtterikantanen",
+ urldate = {2023-04-07},
+ keywords = {contributor},}
Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json
===================================================================
--- trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/doc/support/latexindent/latexindent-yaml-schema.json 2023-04-07 20:53:36 UTC (rev 66794)
@@ -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.20.4 2023-03-15",
+ "description": "latexindent.pl YAML schema helper, V3.20.5 2023-04-07",
"type": "object",
"properties": {
"fileExtensionPreference": {
Modified: trunk/Master/texmf-dist/doc/support/latexindent/latexindent.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/BackUpFileProcedure.pm 2023-04-07 20:53:36 UTC (rev 66794)
@@ -23,6 +23,7 @@
use File::Basename; # to get the filename and directory path
use File::Copy; # to copy the original file to backup (if overwrite option set)
use Exporter qw/import/;
+use Encode qw/decode/;
our @EXPORT_OK = qw/create_back_up_file check_if_different/;
# copy main file to a back up in the case of the overwrite switch being active
@@ -35,7 +36,7 @@
# if we want to over write the current file create a backup first
$logger->info("*Backup procedure (-w flag active):");
- my $fileName = ${$self}{fileName};
+ my $fileName = decode( "utf-8", ${$self}{fileName} );
# grab the file extension preferences
my %fileExtensionPreference = %{ $mainSettings{fileExtensionPreference} };
@@ -48,7 +49,7 @@
my $backupFile = basename( ${$self}{fileName}, @fileExtensions );
# add the user's backup directory to the backup path
- $backupFile = "${$self}{cruftDirectory}/$backupFile";
+ $backupFile = decode( "utf-8", "${$self}{cruftDirectory}/$backupFile" );
# local variables, determined from the YAML settings
my $onlyOneBackUp = $mainSettings{onlyOneBackUp};
@@ -103,9 +104,9 @@
for ( my $i = 1; $i <= $maxNumberOfBackUps; $i++ ) {
# remove number from backUpFile
- my $oldBackupFile = $backupFile;
+ my $oldBackupFile = decode( "utf-8", $backupFile );
$oldBackupFile =~ s/$backupExtension.*/$backupExtension/;
- my $newBackupFile = $oldBackupFile;
+ my $newBackupFile = decode( "utf-8", $oldBackupFile );
# add numbers back on
$oldBackupFile .= $i;
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Document.pm 2023-04-07 20:53:36 UTC (rev 66794)
@@ -20,6 +20,7 @@
use Data::Dumper;
use File::Basename; # to get the filename and directory path
use open ':std', ':encoding(UTF-8)';
+use Encode qw/decode/;
# gain access to subroutines in the following modules
use LatexIndent::Switches
@@ -97,7 +98,7 @@
# one-time operations
$self->store_switches;
- ${$self}{fileName} = $fileNames[0];
+ ${$self}{fileName} = decode( "utf-8", $fileNames[0] );
$self->process_switches( \@fileNames );
$self->yaml_read_settings;
@@ -228,6 +229,10 @@
# if -overwrite is active then output to original fileName
if ( ${$self}{overwrite} ) {
+
+ # diacritics in file names (highlighted in https://github.com/cmhughes/latexindent.pl/pull/439)
+ ${$self}{fileName} = decode( "utf-8", ${$self}{fileName} );
+
$logger->info("Overwriting file ${$self}{fileName}");
open( OUTPUTFILE, ">", ${$self}{fileName} );
print OUTPUTFILE ${$self}{body};
@@ -234,7 +239,16 @@
close(OUTPUTFILE);
}
elsif ( $switches{outputToFile} ) {
+
+ # diacritics in file names (highlighted in https://github.com/cmhughes/latexindent.pl/pull/439)
+ #
+ # note, related:
+ #
+ # git config --add core.quotePath false
+ ${$self}{outputToFile} = decode( "utf-8", ${$self}{outputToFile} );
+
$logger->info("Outputting to file ${$self}{outputToFile}");
+
open( OUTPUTFILE, ">", ${$self}{outputToFile} );
print OUTPUTFILE ${$self}{body};
close(OUTPUTFILE);
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/GetYamlSettings.pm 2023-04-07 20:53:36 UTC (rev 66794)
@@ -341,6 +341,9 @@
}
}
+ # diacritics in YAML names (highlighted in https://github.com/cmhughes/latexindent.pl/pull/439)
+ $_ = decode( "utf-8", $_ );
+
# check for existence and non-emptiness
if ( ( -e $_ ) and !( -z $_ ) ) {
$logger->info("Adding $_ to YAML read paths");
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Item.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Item.pm 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Item.pm 2023-04-07 20:53:36 UTC (rev 66794)
@@ -146,7 +146,7 @@
# there is no white space
my $self = shift;
my $BodyStringLogFile = ${$self}{aliases}{BodyStartsOnOwnLine} || "BodyStartsOnOwnLine";
- $logger->trace("Removing linebreak at the end of begin (see $BodyStringLogFile)");
+ $logger->trace("Removing linebreak at the end of begin (see $BodyStringLogFile)") if $is_t_switch_active;
${$self}{begin} =~ s/\R*$//sx;
${$self}{begin} .= " "
unless ( ${$self}{begin} =~ m/\h$/s or ${$self}{body} =~ m/^\h/s or ${$self}{body} =~ m/^\R/s );
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm 2023-04-07 20:53:36 UTC (rev 66794)
@@ -22,6 +22,7 @@
use Exporter qw/import/;
use LatexIndent::Switches qw/%switches/;
use LatexIndent::Version qw/$versionNumber $versionDate/;
+use Encode qw/decode/;
our @EXPORT_OK = qw/process_switches $logger/;
our $logger;
@@ -128,6 +129,9 @@
# cruft directory
${$self}{cruftDirectory} = $switches{cruftDirectory} || ( dirname ${$self}{fileName} );
+ # diacritics in cruft directory (highlighted in https://github.com/cmhughes/latexindent.pl/pull/439)
+ ${$self}{cruftDirectory} = decode( "utf-8", ${$self}{cruftDirectory} );
+
# if cruft directory does not exist
if ( !( -d ${$self}{cruftDirectory} ) ) {
$logger->fatal("*Could not find directory ${$self}{cruftDirectory}");
Modified: trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/scripts/latexindent/LatexIndent/Version.pm 2023-04-07 20:53:36 UTC (rev 66794)
@@ -20,6 +20,6 @@
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;
-our $versionNumber = '3.20.4';
-our $versionDate = '2023-03-15';
+our $versionNumber = '3.20.5';
+our $versionDate = '2023-04-07';
1
Modified: trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml 2023-04-07 20:53:03 UTC (rev 66793)
+++ trunk/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml 2023-04-07 20:53:36 UTC (rev 66794)
@@ -1,5 +1,5 @@
#
-# latexindent.pl, version 3.20.4, 2023-03-15
+# latexindent.pl, version 3.20.5, 2023-04-07
#
# 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.