-
Notifications
You must be signed in to change notification settings - Fork 26
Open tag leads to wrong formatting #148
Comments
Hey there :) I'm not sure I fully understand the bug yet Your example isn't valid typst code, which is the main source of my confusion, this would be valid for instance:
|
You are absolutely right! I encountered the problem when citing from a bibliography Thanks again |
That is possible indeed but could you provide the full snippet for context! thank you! |
I hope this larger example helps. This translates to the problem in my thesis. #set heading(numbering: "1.")
= Heading 1 <Heading>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet #ref(<Heading>. Lorem
ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
takimata sanctus est Lorem ipsum dolor sit amet.
== Heading 2
Some more text here.
=== Heading 3
#emph[Hello World!] Screen.Recording.2024-02-08.at.14.53.56.mov(This also applies to typstfmt branch master standalone) |
That's super weird and definitely a bug, your firsts screens were enough but i had a hard time accepting it 😂 I'm very surprised by this bug since typst should parse it as an error and we don't touch that I'll try to fix it when i get time again (end of the month probably) |
Hey!
Many thanks for your work on this project which keeps my thesis nice and clean ^^'
I'm not entirely sure if this is intended behavior or if this can be fixed easily.
If it is intended - sorry! If it isn't I would be glad to assist to find a good solution to the problem :D
Thank you very much!
Describe the bug
When having an open tag
#cite(
typst-fmt tries to inline the rest of the document (and doesn't respect boundaries like newlines, headings etc.)To Reproduce
Works on simple document
After format
The problem is that, after closing
#cite()
, typst-fmt can't reconstruct the original syntax tree.The text was updated successfully, but these errors were encountered: