For example, see https://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/. This is the approach I'm using on one of my Jekyll sites at the moment.
Is there a way to achieve the same thing using Hugo? More concretely, is there a way to modify the built-in code fence handling to also allow highlighted line numbers to be passed in?
Thanks!
I already mentioned that in my post. My question was around using the hl_lines option in conjunction with code fences, which is not explained in the documentation.
Please excuse the necro-threading here, but I appear to be missing something. Based on the above, with Goldmark I should be able to highlight a line in a code block like this, right?
```bash {hl_lines="3"}
A line
another line
A highlighted line
Ooh, that was neat.
Here, have a $var
```
In my testing, the only way I’ve been able to highlight a line is with a custom shortcode.