Specific Code Line Highlighting

I wanted to know if it’s possible to highlight specific lines of code in a code block? (like with a yellow background, not syntax highlighting)

For example:

def add(a,b)
  c = a + b
  puts c # I want to highlight this line
end

I am using middleman-syntax gem which itself uses rouge. Fenced code blocks and syntax highlighting all works perfectly, however I haven’t been able to get this “background highlighting” trick working. Would love some help.

What have your tried to do in order to solve it so far? Can you just wrap that line around a element with a class for highlighting with css?

I forgot to mention that the idea of this particular feature is to use it with Markdown, this would make inserting/mixing HTML elements between the Markdown not very ideal.

I’ve seen some implementations of this in Jekyll where they specify after the code block back ticks, the line numbers to be highlighted (Example: {0, 2, 3}).