Improve Typst Lexer by Nerixyz · Pull Request #2724 · pygments/pygments

That was quick 😄

I imported your lexer into chroma and tested it with the following snippet:

#let song(
  title: none,
  title_index: none,
  singer: none,
  singer_index: none,
  references: (),
  line_color: rgb(0xd0, 0xd0, 0xd0),
  header_display: (number, title, singer) => grid(
    columns: (auto,1fr),
    inset: 4pt,
    align: horizon,
    grid.cell(fill: rgb(0xd0, 0xd0, 0xd0),align: top, inset:(rest:4pt, /*right: 10pt*/), heading(outlined: false,str(number))),
    [
      #heading(title)
      #if singer != none {
        strong(singer) + "\n"
      }
    ],
  ),
  // comment
  doc,
)

the \n looks off (and the nearby #if is not styled):

image

This may be due to the conversion to chroma's xml (I don't know how to use pygment to quickly render a snippet, so maybe this issue is not present here), but maybe you can reproduce it/test it as well?