astrale-sharp / typstfmt

Apache License 2.0
253 stars 25 forks source link

Extra trailing commas in `mat` #102

Closed TheJiahao closed 1 year ago

TheJiahao commented 1 year ago

Describe the bug typstfmt inserts extra commas to mat() when the line is too long and contains ";". Tested with typstfmt version 0.2.5 on Windows 11.

To Reproduce Mininal working example below:

$mat(11111111111111111111111111111111111111111111111111111111111111111111111111;)$

Steps to reproduce:

  1. Running typstfmt once:
    $mat(
    11111111111111111111111111111111111111111111111111111111111111111111111111;,
    )$
  2. Rerun typstfmt
    $mat(
    11111111111111111111111111111111111111111111111111111111111111111111111111;, ,
    )$
  3. Repeat 2. and typstfmt adds extra comma every time.
astrale-sharp commented 1 year ago

Thank you for this great report ! I would have never found that bug myself, I'll try to fix it tomorrow!

astrale-sharp commented 1 year ago

And I failed to fix it tomorrow which means I fixed it today ! :innocent: Don't hesitate to reopen if I missed something!