-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
This is a problem that has always existed, but has not affected its use.
We always trim trailing whitespaces to avoid non-empty blank lines and unexpected spaces after separators. However, this is a bad idea for multiline strings and raws.
For example:
#"1
2"There are invisible trailing spaces in L1 and L2. The string changes if we trim these spaces.
That is the same for raws.
To fix this, we need to revamp the pretty engine.
As a reference, the biome formatter uses a weak space/line model to avoid producing unnecessary whitespaces.
Playground link
https://typstyle-rs.github.io/typstyle/playground/?code=MQIgjABAsAUNMCYRA
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working