diff --git a/.github/workflows/batch-check.yaml b/.github/workflows/batch-check.yaml index 79256ac0..1cb921ac 100644 --- a/.github/workflows/batch-check.yaml +++ b/.github/workflows/batch-check.yaml @@ -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 @@ -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 \ No newline at end of file diff --git a/.github/workflows/build-documentation-and-executables.yaml b/.github/workflows/build-documentation-and-executables.yaml index 0ce31182..cc58cf16 100644 --- a/.github/workflows/build-documentation-and-executables.yaml +++ b/.github/workflows/build-documentation-and-executables.yaml @@ -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 diff --git a/test-cases/GCString-test/GCString.tex b/test-cases/GCString-test/GCString.tex new file mode 100644 index 00000000..568e13e6 --- /dev/null +++ b/test-cases/GCString-test/GCString.tex @@ -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} \ No newline at end of file