Highlight specific line in markdown

On SO, langauge highlighting is possible as explained in Advanced Help but not formatting within code blocks.

This is a code block
Markdown is **not** processed

You might mimic what you want by using quote:

This line won't be highlighted.
This line will be highlighted.
This line will be highlighted.
This line won't be highlighted.

You might also mimic what you want by using two spaces at end of each line:

This line won't be highlighted.
This line will be highlighted.
This line won't be highlighted.

But of course, these are not then rendered in monospaced font nor do you get syntax highlighting.


It can be done, but there is no Markdown syntax for it, at least not on the most common flavors. Fortunately, also on the most common flavors you can embed HTML.

My solution:

Example


function main() {
    __config_bash
    __config_xdg_dirs
}

Code

<pre><code>
    function main() {
        __config_bash
        <strong>__config_xdg_dirs</strong>
    }
</code></pre>