Closed Mikachu2333 closed 1 month ago
Useful yaml setting contribute to this bug
textWrapOptions:
comments:
wrap: 1
This doesn't seem to be related to Chinese characters.
Using
% 1
% 2
and the minimal settings
modifyLineBreaks:
textWrapOptions:
comments:
wrap: 1
gives the error:
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\G((?>(?!\n)\PM\pM*|(?<![^\n])\pM+){ <-- HERE 0,-2})((?>\n|\r\n|[^\x{a0}\x{202f}\S]\pM*)|\n+|\z)/ at /home/cmhughes/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/Text/Wrap.pm line 56.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\G((?>(?!\n)\PM\pM*|(?<![^\n])\pM+){ <-- HERE -2})/ at /home/cmhughes/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/Text/Wrap.pm line 61.
Increasing $Text::Wrap::columns from -1 to 2 at /home/cmhughes/projects/latexindent/LatexIndent/Wrap.pm line 721.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\G((?>(?!\n)\PM\pM*|(?<![^\n])\pM+){ <-- HERE 0,-2})((?>\n|\r\n|[^\x{a0}\x{202f}\S]\pM*)|\n+|\z)/ at /home/cmhughes/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/Text/Wrap.pm line 56.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\G((?>(?!\n)\PM\pM*|(?<![^\n])\pM+){ <-- HERE -2})/ at /home/cmhughes/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/Text/Wrap.pm line 61.
Increasing $Text::Wrap::columns from -1 to 2 at /home/cmhughes/projects/latexindent/LatexIndent/Wrap.pm line 784.
Sorry but I got no error... and latexindent.pl just exchange my comments to the number "3"
RE-update
Yes, it is not related to CJK characters.
Here is a video for this issue
https://github.com/user-attachments/assets/c5e58f07-be12-4dcf-9a46-78adb0a4d451
The problem is that columns
hasn't been specified.
However, latexindent should fail gracefully. I'll get to this soon, hopefully.
Implemented at https://github.com/cmhughes/latexindent.pl/releases/tag/V3.24.4, uploaded to ctan, thanks for reporting.
Please provide the following when posting an issue:
original .tex code
yaml settings
actual/given output
No errors.
desired or expected output
anything else
Latex Workshop Settings