typstfmt icon indicating copy to clipboard operation
typstfmt copied to clipboard

Unstable indentation calcultation

Open drupol opened this issue 1 year ago • 2 comments

Hello,

When running typstfmt on this snippet:

#focus-slide[
  #fit-to-height(3em)[Introduction]

  #pdfpc.speaker-note(```
    Let's start the introduction with a quote from Foo Bar
  ```)
]

the resulting output is:

#focus-slide[
  #fit-to-height(3em)[Introduction]

  #pdfpc.speaker-note(```
      Let's start the introduction with a quote from Ken Thompson
    ```)
]

I believe that there's an issue in the #pdfpc.speaker-note handling. Also, when running multiple times the formatter on that example, the indentation never stops growing, after a couple of times, it become:

#focus-slide[
  #fit-to-height(3em)[Introduction]

  #pdfpc.speaker-note(```
                    Let's start the introduction with a quote from Ken Thompson
                  ```)
]

drupol avatar Oct 31 '23 12:10 drupol