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.

image

Could you please help me achieve this ?

Am using jekyll 4.2.1

Thanks in advance.

Regards,
Poovarasan K

Hi

Any update on this ?

Regards,
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 PygmentsRouge::Formatters::HTMLLineHighlighter.new(formatter, highlight_lines: [3, 5])