Is it possible to highlight or emphasize a part of code that's inside backticks
or:
a code block
?
Would be useful for pointing to what's changed, but the FAQ entry doesn't say anything about this.
Is it possible to highlight or emphasize a part of code that's inside backticks
or:
a code block
?
Would be useful for pointing to what's changed, but the FAQ entry doesn't say anything about this.
It's possible with HTML
1) A code block
Emphasis on this
<pre><code>Emphasis on <b>this</b>
</code></pre>
2) Inline code: Emphasis on this
Inline code: <code>Emphasis on <b>this</b></code>
Depending on the code, you'd need HTML entities to render it ok.
No you can't do that. If you use backticks or four spaces to show code then exactly what you type gets rendered.
So if you try to bold something:
I want this bold
you'd actually get this:
I want **this** bold
The only way to emphasise something would be to use comments to point out what's at fault as this won't mess with the syntax highlighting:
if (parameter == null) then
{
parameter.Method(); // <-- It's this that goes wrong
}
// ^^^
pointing to the specific characters
If you build on @ChrisF's solution you can have a full code block if you format something like this
<!-- language: lang-html -->
<pre><code><div>
<input name="someInput" value=<b>"highlight"</b>>
</div>
</code></pre>
Which would produce:
<div>
<input name="someInput" value="highlight">
</div>
More information can be found in this answer
Though this is not completely answering the question still it is possible at least to emphasize
or make bold
the whole text inside of backticks
without the need for HTML markup simply by surrounding the backticks
by *
or **
. Check the code of this answer to get the picture.
1st half
,<br />highlighted part,<br />2nd half.