typstfmt
typstfmt copied to clipboard
Multi line comments are deleted from empty functions
- [x] I have tested with the master version of typstfmt and not just typst-lsp
Tested on commit 792f08f41d3c081bcc04675100e8a5f615567b3a
Describe the bug Formatting a function with nothing inside it's body except a multi line comment causes the comment to be deleted. This behavior does not affect single line comments, and goes away as soon as there is anything else in the function body.
To Reproduce Steps to reproduce the behavior:
- Start with this code:
#let test_func() = {
/*
test
*/
}
- Format the document
- Watch as your comment disappears
#let test_func() = {}