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 (https://github.com/Keats/vincentprouillet/commit/c5db5e8fde18145879f61d959b4a13b1c607c0e6) and your suggestion could be another nice thing to add to the list. I won’t have time to implement those myself though :confused: