astrale-sharp / typstfmt

Apache License 2.0
253 stars 25 forks source link

[bug] code block formatting #131

Closed Ciflire closed 11 months ago

Ciflire commented 11 months ago

[x ] I have tested with the master version of typstfmt and not just typst-lsp

Describe the bug Infinite indenting when formatting a specific code block

To Reproduce format the following code

#let code_block(body) = {
  block(fill: rgb(240, 240, 245), radius: 3pt, inset: 8pt)[#body]
}

deux branches\
#code_block()[```
                      /admin
                      /créerEpreuve
                      /supprimerEpreuve
                      /modifierEpreuve
                      /créerUtilisateurs
                      /supprimerUtilisateurs
                      /consulterJetons
                      /exporterJetons

                      /user

]

astrale-sharp commented 11 months ago

Are you sure? I tested myself your snippets and it stays stable indentation wise.

The fix for is not yet released as a binary or in typst-lsp but I'm closing this for now cause it is fixed, don't hesitate to reopen!