The typical approach I’ve seen is to add it to the opening code fence, treating it as comma-separated. This is how options are done in rustdoc (e.g.
```rust,ignore,compile_fail,no_run,should_panic, to use a bunch that don’t actually fit well together!).
Something like this could do it:
```rust, linenos, hl_lines=3-8 10-20
But I must remark with this that I consider line highlighting to be insufficient: I require character highlighting. My FizzBuzz article is an example; I achieved that in my current Hyde-powered site by extending its syntax highlighting with an extra step that roughly turns
</mark>. (It doesn’t work perfectly with all languages, as the
« may mess up the syntax highlighter, it still being there during syntax highlighting—but it worked for Rust, and that’s all I needed at the time. For best results, this would need to be integrated into the highlighter more perfectly.)
I’m slowly working on migrating to Zola, and I expect I’ll indefinitely maintain a fork for this and other reasons. (Another sample reason: inline syntax highlighting, which pure shortcodes are insufficient for.)
It’s moderately irrelevant, but I also find myself today wanting to combine languages, like