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

bold + comment ends up creating incorrect typst code #161

Open
Doublonmousse opened this issue Mar 20, 2024 · 2 comments
Open

bold + comment ends up creating incorrect typst code #161

Doublonmousse opened this issue Mar 20, 2024 · 2 comments

Comments

@Doublonmousse
Copy link

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

Describe the bug
Formatting with comments and bold end up creating *// symbols that are not correct typst code

To Reproduce
Format the following file

start *test and
 going on 
and on*
//comment and on

and obtain

start *test and going on and on*//comment and on

that won't compile because of the *//

@astrale-sharp
Copy link
Owner

Hey there! very interesting, we might try to find a fix but honestly if text// parses, there is no reason *text*// shouldn't, So I consider this a typst parser bug, might open a PR tomorrow or today ;)

@astrale-sharp
Copy link
Owner

Apparently it's a feature! typst/typst#3735 (comment)
Then we need to respect this!

It's weird formatting anyway cause start *text* // is prettier anyway

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