Skip to content

Commit

Permalink
bug fix "[latexindent.exe] -GCString switch cannot run normally"
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzyf committed Mar 25, 2024
1 parent c05b4af commit edbdf6f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 40 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/batch-check.yaml
Original file line number Diff line number Diff line change
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 -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,8 @@ 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 -o=++
cat test-cases/GCString-test/indent.log
24 changes: 4 additions & 20 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 -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
13 changes: 13 additions & 0 deletions test-cases/GCString-test/GCString.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\begin{table}[H]
\centering
\begin{tblr}{
hlines,
vlines,
cells = {c,m}}
5:30 & 起床 & 12:30~14:00 & 午休 \\
6:00~7:00 & 早操 & 14:00~17:30 & 集训 \\
7:00~7:50 & 早餐 & 17:30~18:30 & 晚餐 \\
7:50~11:00 & 集训 & 19:00~21:00 & 晚自习 \\
11:00~12:30 & 午餐 & 23:00 & 熄灯 \\
\end{tblr}
\end{table}

0 comments on commit edbdf6f

Please sign in to comment.