user42: I was adding some code to a question, and noticed that I couldn't get syntax highlighting to work. I added a language hint as is used on Stack Overflow, but it had no effect.
I appreciate that most SE sites won't need syntax highlighting (which is presumably why it's not enabled by default), but obviously it could be very useful for us. Is that something which will be sorted out if/when we graduate to 'proper' SE status, or can we realistically do something about it just now?

user19409: Simply edit the question to add the following text before the code:
<!-- language-all: c++ -->

Note: This should not be indented by the 4 spaces and should have a carriage return before and after.
This also works:
<!-- language-all: lang-cpp -->


Stack Exchange uses Google Prettify for all of the syntax highlighting. 
Markdown Editor Help

Code blocks can be highlighted using Google Prettify. In many cases, the syntax highlighting language will be inferred from the question's tags.


user185: This is enabled, and on by default in the programming tag.
You can use language hints to fine-tune the highlighting if the defaults aren't acceptable.

42: <p>I was adding some code to a question, and noticed that I couldn't get syntax highlighting to work. I added a language hint as is used on Stack Overflow, but it had no effect.</p>

<p>I appreciate that most SE sites won't need syntax highlighting (which is presumably why it's not enabled by default), but obviously it could be very useful for us. Is that something which will be sorted out if/when we graduate to 'proper' SE status, or can we realistically do something about it just now?</p>
 19409: <p>Simply edit the question to add the following text before the code:</p>

<pre><code>&lt;!-- language-all: c++ --&gt;
</code></pre>

<p>Note: This should <strong>not</strong> be indented by the 4 spaces and should have a carriage return before and after.</p>

<p>This also works:</p>

<pre><code>&lt;!-- language-all: lang-cpp --&gt;
</code></pre>

<hr>

<p>Stack Exchange uses Google Prettify for all of the syntax highlighting. 
<a href="https://arduino.stackexchange.com/editing-help#syntax-highlighting">Markdown Editor Help</a></p>

<blockquote>
  <p>Code blocks can be highlighted using Google Prettify. In many cases, the syntax highlighting language will be inferred from the question's tags.</p>
</blockquote>
 185: <p>This is enabled, and on by default in the <a href="https://arduino.stackexchange.com/questions/tagged/programming" class="post-tag" title="show questions tagged &#39;programming&#39;" rel="tag">programming</a> tag.</p>

<p>You can use <a href="https://arduino.stackexchange.com/editing-help#syntax-highlighting">language hints</a> to fine-tune the highlighting if the defaults aren't acceptable.</p>
