Styling inline code (with typst syntax highlighting) in the forum

As far as I’m aware of the syntax highlighting only works for full paragraphs. When you want to show typst code inline, I think you have to use “`” instead. The problem is, that the “preformatted text” does no syntax highlighting. I think this would greatly improve readability of little code snippets you want to talk about inline.
Or am I missing something and it is already a thing :sweat_smile: ?

1 Like

I first overlooked that this is Meta and was confused because Typst can already do ```typ foo``` inline :stuck_out_tongue: would you mind adding “on the forum” or something like that to the title?

Yeah that’s a downside of Discourse’s Markdown. I’m not sure how configurable that is though…

I don’t think it’s possible to have a shorthand option without a plugin.
In pandoc-style markdown (and others), you would write

`#let a = 0`{.typ}

I am unaware of any Discourse plugin for syntax highlighting inline code.

1 Like