How to highlight the specific lines of code snippet?

Currently we are converting the md files in to html files using Jekyll.

I would like to highlight the some of the code snippet lines like below.


Could you please help me achieve this ?

Am using jekyll 4.2.1

Thanks in advance.

Poovarasan K


Any update on this ?

Poovarasan K

not sure it can be done - jekyll uses rouge for highlighting and it didn’t used to support this, I see now that if does:

but I don’t think jekyll supports the new option in rouge.

In rouge it is here:
GitHub - rouge-ruby/rouge: A pure Ruby code highlighter that is compatible with, highlight_lines: [3, 5])