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

Extra new line and trailing comma in mat #162

@TheJiahao

Description

@TheJiahao
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions