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

Multi line comments are deleted from empty functions #139

Open
1 task done
BattleCh1cken opened this issue Dec 21, 2023 · 1 comment
Open
1 task done

Multi line comments are deleted from empty functions #139

BattleCh1cken opened this issue Dec 21, 2023 · 1 comment

Comments

@BattleCh1cken
Copy link
Contributor

BattleCh1cken commented Dec 21, 2023

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

Tested on commit 792f08f

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:

  1. Start with this code:
#let test_func() = {
/*
test
*/
}
  1. Format the document
  2. Watch as your comment disappears
#let test_func() = {}
@astrale-sharp
Copy link
Owner

Thanks for the report! Needs investigation ASAP ......

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

2 participants