HTML in code blocks

How can I e.g. use italics to mark up placeholders in code snippets (like in the arch linux wiki)?

I am not sure. You can disable syntax highlighting and write the code block by hand. I am guessing the Arch wiki has a WYSIWYG editor that does it for them.

I don’t care about having to write <pre> and </pre>, but I’d prefer not losing syntax highlighting. Could there be a {% code() %} shortcode for example? with an optional parameter to control how the syntax highlighter behaves with HTML tags, which e.g. can be set to "ignore" or "unwrap".

Another motivation for this feature is explaining code by parts. See this section in the nix manual for an example.

It would have to hook pretty deep in syntect I think, definitely not a trivial change.

There are some additional things that would be nice to have with regards to syntax highlighting: line numbers, line highlighted ( and your suggestion could be another nice thing to add to the list. I won’t have time to implement those myself though :confused: