(This question is not duplicate of How do I format my code blocks?, I know how to format code blocks.)
I want to have some words to be bold in code block.
To do so I format code block with <pre><code>
, and bold some text with <b>
. Preview looks just fine (code is formatted), but code format check bug/future prevents me to submit answer.
When I try to post the following code:
<pre><code> public <b>String[]</b> array; </code></pre>
I got this error:
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.
Screenshot:
<
for<
) yourself", when using that method for code formatting. – user247702 Sep 8 '17 at 14:02<
and>
except<b>
and</b>
, because I want to bold some text in code. – diralik Sep 8 '17 at 14:03<pre><code>
. You're supposed to indent each line of the block with 4 spaces. – Cody Gray♦ Sep 8 '17 at 14:29<pre>
and<code>
. As mentioned by the OP, these tags work as expected in the code preview. That may be a bug (or unintentional feature), as mentioned by @stijn, but I think it's a bit confusing nonetheless. Maybe this restriction could be mentioned explicitly on the help page? – djvg Dec 7 '18 at 17:40