Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Extra new line and trailing comma in mat #162

Open
1 task done
TheJiahao opened this issue Mar 24, 2024 · 0 comments
Open
1 task done

Extra new line and trailing comma in mat #162

TheJiahao opened this issue Mar 24, 2024 · 0 comments

Comments

@TheJiahao
Copy link

TheJiahao commented Mar 24, 2024

  • I have tested with the master version of typstfmt and not just typst-lsp

Describe the bug
Extra comma and new line inserted to long mat calls with named parameters before entries and semicolon. Almost same as #102, tested with typstfmt v0.2.9.

To Reproduce
Minimal working examples:

$
mat(delim: "[", 0123456789012345678901234567890123456789012345678901234567;)
$
$
mat(delim: "[", 0123456789012345678901234567890123456789012345678901234567;0)
$

Steps to reproduce the behavior:

  1. Run typstfmt once:

    $
      mat(
        delim: "[", 0123456789012345678901234567890123456789012345678901234567;,
    
      )
    $
  2. Rerun typstfmt

    $
      mat(
        delim: "[", 0123456789012345678901234567890123456789012345678901234567;, ,
    
      )
    $
    
  3. Repeat 2. and typstfmt adds extra comma every time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant