Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhughes committed Mar 28, 2024
2 parents 16c9bd6 + 4153849 commit 9220bdf
Show file tree
Hide file tree
Showing 33 changed files with 332 additions and 82 deletions.
139 changes: 118 additions & 21 deletions .github/workflows/batch-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
with:
fetch-depth: 2
- name: Check for changed pm files, latexindent.pl, defaultSettings.yaml
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v43
id: changed-files
with:
files: |
Expand Down Expand Up @@ -152,34 +152,18 @@ jobs:
cpanm Unicode::GCString
cpanm --force Win32::Unicode::File
cpanm --force Win32::API
- name: rebuild and install PAR-Packer-master
#If the version number of PAR::Packer does not exceed 1.061, it is necessary to rebuild and install PAR-Packer-master
#https://github.com/rschupp/PAR-Packer/issues/84
#Issue #84: pass UTF-16 command line down to my_perl (using _wspawnvp)
run: |
Invoke-WebRequest -Uri https://github.com/rschupp/PAR-Packer/archive/refs/heads/master.zip -OutFile PAR-Packer-master.zip
unzip PAR-Packer-master.zip
cd PAR-Packer-master
perl Makefile.PL
gmake
gmake install
- name: preparations for PAR packer
run: |
sed -i'.bak' -r 's,eval\s\"use\sUnicode::GCString\"\sif\s\$switches\{GCString\},use Unicode::GCString,' latexindent.pl
SET PAR_VERBATIM=1
#
# https://metacpan.org/pod/pp
# https://github.com/plk/biber/blob/dev/dist/MSWIN64/build.bat
#
- name: create latexindent.exe using PAR Packer
run: >-
pp
-T
-M Win32::Unicode
--addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml"
--cachedeps=scancache
--output latexindent.exe
latexindent.pl
shell: cmd
run: |
set PAR_VERBATIM=1
pp -T -M Win32::Unicode --addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml" --cachedeps=scancache --output latexindent.exe latexindent.pl
- name: latexindent.exe help
run: |
./latexindent.exe --help
Expand All @@ -204,3 +188,116 @@ jobs:
cat test-cases/back-up-tests/indent.log
./latexindent.exe test-cases/back-up-tests/新建äö.tex -g="新建äö.log" -c="D:/新建"
cat D:/新建/新建äö.log
- name: latexindent.exe -GCString test, issue 531
# https://github.com/cmhughes/latexindent.pl/issues/531
run: |
./latexindent.exe test-cases/GCString-test/GCString.tex -y="defaultIndent: ' '" -GCString -g="indent.log" -o=++
cat test-cases/GCString-test/indent.log
linux-executable-GCString-test:
name: 'create Linux executable latexindent'
runs-on: 'ubuntu-latest'
steps:
#
# checkout github.com/cmhughes/latexindent.pl
# https://github.com/actions/checkout
#
- name: load the "base actions/checkout" so as to access latexindent.pl
uses: actions/checkout@v4
#
# https://github.com/marketplace/actions/setup-perl-environment
#
- name: install Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.32'
- name: install Perl modules using cpan
run: |
cpanm -f PAR::Packer
cpanm YAML::Tiny
cpanm File::HomeDir
cpanm Unicode::GCString
- name: preparations for PAR packer
run: |
sed -i'.bak' -r 's,eval\s\"use\sUnicode::GCString\"\sif\s\$switches\{GCString\},use Unicode::GCString,' latexindent.pl
PAR_VERBATIM=1
#
# https://metacpan.org/pod/pp
# https://github.com/plk/biber/blob/dev/dist/linux-musl_x86_64/build.sh
#
- name: create Linux executable latexindent using PAR Packer
run: >-
pp
--addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml"
--cachedeps=scancache
--output latexindent-linux
latexindent.pl
- name: latexindent-linux -GCString test, issue 531
# https://github.com/cmhughes/latexindent.pl/issues/531
run: |
./latexindent-linux test-cases/GCString-test/GCString.tex -y="defaultIndent: ' '" -GCString -g="indent1.log" -o=++
cat test-cases/GCString-test/indent1.log
continue-on-error: true
- name: create Linux executable latexindent using PAR Packer
run: |
export PAR_VERBATIM=1
pp --addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml" --cachedeps=scancache --output latexindent-linux2 latexindent.pl
- name: latexindent-linux2 -GCString test, issue 531
# https://github.com/cmhughes/latexindent.pl/issues/531
run: |
./latexindent-linux2 test-cases/GCString-test/GCString.tex -y="defaultIndent: ' '" -GCString -g="indent2.log" -o=++
cat test-cases/GCString-test/indent2.log
macos-executable-GCString-test:
name: 'create MacOS executable latexindent'
runs-on: 'macos-latest'
steps:
#
# checkout github.com/cmhughes/latexindent.pl
# https://github.com/actions/checkout
#
- name: load the "base actions/checkout" so as to access latexindent.pl
uses: actions/checkout@v4
#
# https://github.com/marketplace/actions/setup-perl-environment
#
- name: install Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.32'
- name: install Perl modules using cpan
run: |
cpanm -f PAR::Packer
cpanm YAML::Tiny
cpanm -f File::HomeDir
cpanm Unicode::GCString
- name: preparations for PAR packer
run: |
sed -i'.bak' -r 's,eval\s\"use\sUnicode::GCString\"\sif\s\$switches\{GCString\},use Unicode::GCString,' latexindent.pl
PAR_VERBATIM=1
#
# https://metacpan.org/pod/pp
# https://github.com/plk/biber/blob/dev/dist/linux-musl_x86_64/build.sh
#
- name: create MacOS executable latexindent using PAR Packer
run: >-
pp
--addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml"
--cachedeps=scancache
--output latexindent-macos
latexindent.pl
- name: latexindent-macos -GCString test, issue 531
# https://github.com/cmhughes/latexindent.pl/issues/531
run: |
./latexindent-macos test-cases/GCString-test/GCString.tex -y="defaultIndent: ' '" -GCString -g="indent1.log" -o=++
cat test-cases/GCString-test/indent1.log
continue-on-error: true
- name: create MacOS executable latexindent using PAR Packer
run: |
export PAR_VERBATIM=1
pp --addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml" --cachedeps=scancache --output latexindent-macos2 latexindent.pl
- name: latexindent-macos2 -GCString test, issue 531
# https://github.com/cmhughes/latexindent.pl/issues/531
run: |
./latexindent-macos2 test-cases/GCString-test/GCString.tex -y="defaultIndent: ' '" -GCString -g="indent2.log" -o=++
cat test-cases/GCString-test/indent2.log
44 changes: 10 additions & 34 deletions .github/workflows/build-documentation-and-executables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,34 +88,18 @@ jobs:
cpanm Unicode::GCString
cpanm --force Win32::Unicode::File
cpanm --force Win32::API
- name: rebuild and install PAR-Packer-master
#If the version number of PAR::Packer does not exceed 1.061, it is necessary to rebuild and install PAR-Packer-master
#https://github.com/rschupp/PAR-Packer/issues/84
#Issue #84: pass UTF-16 command line down to my_perl (using _wspawnvp)
run: |
Invoke-WebRequest -Uri https://github.com/rschupp/PAR-Packer/archive/refs/heads/master.zip -OutFile PAR-Packer-master.zip
unzip PAR-Packer-master.zip
cd PAR-Packer-master
perl Makefile.PL
gmake
gmake install
- name: preparations for PAR packer
run: |
sed -i'.bak' -r 's,eval\s\"use\sUnicode::GCString\"\sif\s\$switches\{GCString\},use Unicode::GCString,' latexindent.pl
SET PAR_VERBATIM=1
#
# https://metacpan.org/pod/pp
# https://github.com/plk/biber/blob/dev/dist/MSWIN64/build.bat
#
- name: create latexindent.exe using PAR Packer
run: >-
pp
-T
-M Win32::Unicode
--addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml"
--cachedeps=scancache
--output latexindent.exe
latexindent.pl
shell: cmd
run: |
set PAR_VERBATIM=1
pp -T -M Win32::Unicode --addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml" --cachedeps=scancache --output latexindent.exe latexindent.pl
- name: move latexindent.exe to release directory
run: |
mkdir -p target/release
Expand Down Expand Up @@ -163,18 +147,14 @@ jobs:
- name: preparations for PAR packer
run: |
sed -i'.bak' -r 's,eval\s\"use\sUnicode::GCString\"\sif\s\$switches\{GCString\},use Unicode::GCString,' latexindent.pl
PAR_VERBATIM=1
#
# https://metacpan.org/pod/pp
# https://github.com/plk/biber/blob/dev/dist/linux-musl_x86_64/build.sh
#
- name: create Linux executable latexindent using PAR Packer
run: >-
pp
--addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml"
--cachedeps=scancache
--output latexindent-linux
latexindent.pl
run: |
export PAR_VERBATIM=1
pp --addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml" --cachedeps=scancache --output latexindent-linux latexindent.pl
- name: move Linux latexindent to release directory
run: |
mkdir -p target/release
Expand Down Expand Up @@ -222,18 +202,14 @@ jobs:
- name: preparations for PAR packer
run: |
sed -i'.bak' -r 's,eval\s\"use\sUnicode::GCString\"\sif\s\$switches\{GCString\},use Unicode::GCString,' latexindent.pl
PAR_VERBATIM=1
#
# https://metacpan.org/pod/pp
# https://github.com/plk/biber/blob/dev/dist/linux-musl_x86_64/build.sh
#
- name: create MacOS executable latexindent using PAR Packer
run: >-
pp
--addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml"
--cachedeps=scancache
--output latexindent-macos
latexindent.pl
run: |
export PAR_VERBATIM=1
pp --addfile="defaultSettings.yaml;lib/LatexIndent/defaultSettings.yaml" --cachedeps=scancache --output latexindent-macos latexindent.pl
- name: move MacOS latexindent to release directory
run: |
mkdir -p target/release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-cases-on-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fetch-depth: 0
- name: Get changed files, latexindent.pl
id: changed-files
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v43
with:
files: |
latexindent.pl
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
sed -i.bak "s/checkgitdiff//" test-cases.sh
./test-cases.sh -s
- name: Check for changed files in test-cases
uses: tj-actions/changed-files@v42
uses: tj-actions/changed-files@v43
id: changed-files
with:
files: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FROM perl:5.38.2-slim-threaded-buster
#

ARG LATEXINDENT_VERSION
ENV LATEXINDENT_VERSION ${LATEXINDENT_VERSION:-V3.23.7}
ENV LATEXINDENT_VERSION ${LATEXINDENT_VERSION:-V3.23.8}

RUN apt-get update \
&& apt-get install \
Expand Down
2 changes: 1 addition & 1 deletion LatexIndent/Document.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use warnings;
use Data::Dumper;
use File::Basename; # to get the filename and directory path

#use open ':std', ':encoding(UTF-8)';
use open ':std', ':encoding(UTF-8)';
use Encode qw/decode/;

# gain access to subroutines in the following modules
Expand Down
4 changes: 2 additions & 2 deletions LatexIndent/Version.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ use warnings;
use Exporter qw/import/;
our @EXPORT_OK = qw/$versionNumber $versionDate/;

our $versionNumber = '3.23.7';
our $versionDate = '2024-03-16';
our $versionNumber = '3.23.8';
our $versionDate = '2024-03-28';
1
2 changes: 1 addition & 1 deletion defaultSettings.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# latexindent.pl, version 3.23.7, 2024-03-16
# latexindent.pl, version 3.23.8, 2024-03-28
#
# defaultSettings.yaml, the default settings for latexindent.pl
#
Expand Down
8 changes: 6 additions & 2 deletions documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<!-- announcement: enhancement for UTF-named files in latexindent.exe-->
<!-- announcement: STDIN and GCString bugfixes-->

# changelog.md

## V3.23.8, March 28, 2024
STDIN and GCString update, see [issue 528](https://github.com/cmhughes/latexindent.pl/issues/528) and [issue 531](https://github.com/cmhughes/latexindent.pl/issues/531); thanks to @Mikachu2333 and @saxyx

## V3.23.7, March 16, 2024
better support for UTF-named files in `latexindent.exe`, see [issue-505](https://github.com/cmhughes/latexindent.pl/issues/505) thanks to @ fengzyf
better support for UTF-named files in `latexindent.exe`, see [issue-505](https://github.com/cmhughes/latexindent.pl/issues/505) thanks to @fengzyf

## V3.23.6, January 17, 2024
further enhancement for replacement feature, see [issue-503](https://github.com/cmhughes/latexindent.pl/issues/503)
Expand Down
4 changes: 2 additions & 2 deletions documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
# built documents.
#
# The short X.Y version.
version = u'3.23.7'
version = u'3.23.8'
# The full version, including alpha/beta/rc tags.
release = u'3.23.7'
release = u'3.23.8'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-conda.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.23.7
rev: V3.23.8
hooks:
- id: latexindent-conda
args: [-s]
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-cpan.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.23.7
rev: V3.23.8
hooks:
- id: latexindent
args: [-s]
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.23.7
rev: V3.23.8
hooks:
- id: latexindent
args: [-l, -m, -s, -w]
2 changes: 1 addition & 1 deletion documentation/demonstrations/pre-commit-config-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.23.7
rev: V3.23.8
hooks:
- id: latexindent-docker
args: [-s]
2 changes: 1 addition & 1 deletion documentation/latexindent-yaml-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.23.7 2024-03-16",
"description": "latexindent.pl YAML schema helper, V3.23.8 2024-03-28",
"type": "object",
"properties": {
"fileExtensionPreference": {
Expand Down
2 changes: 1 addition & 1 deletion documentation/latexindent.tex
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@

\lstdefinestyle{lookForAlignDelims}{
style=yaml-LST,
firstnumber=158,linerange={158-176},
firstnumber=158,linerange={158-177},
numbers=left,
}

Expand Down
2 changes: 1 addition & 1 deletion documentation/readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
latexindent.pl, version 3.23.7, 2024-03-16
latexindent.pl, version 3.23.8, 2024-03-28

PERL script to indent code within environments, and align delimited
environments in .tex files.
Expand Down
4 changes: 2 additions & 2 deletions documentation/title.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
sharp corners,
enhanced,
overlay={\node[anchor=north east,outer sep=2pt] at ([xshift=3cm,yshift=4mm]frame.north east) {\includegraphics[width=3cm]{logo}}; }]
\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.23.7
\centering\ttfamily\bfseries latexindent.pl\\[1cm] Version 3.23.8
\end{tcolorbox}
}
\author{Chris Hughes \thanks{and contributors!
See \vref{sec:contributors}.
For
all communication, please visit \cite{latexindent-home}.}}
\date{2024-03-16}
\date{2024-03-28}
\maketitle
\begin{adjustwidth}{1cm}{1cm}
\small
Expand Down
Loading

0 comments on commit 9220bdf

Please sign in to comment.