Disqus supports automatic syntax highlighting in a number of languages. To use this feature, place your code inside <pre><code> tags. For example:
<pre><code>
var foo = 'bar';
alert('foo');
</code></pre>
By default, Disqus will try to automatically detect the language. It's pretty good at this, but you can give it a hand by doing the following:
<pre><code class="javascript">
var foo = 'bar';
alert('foo');
</code></pre>
Supported languages
- Bash
- Diff
- JSON
- Perl
- C#
- HTML/XML
- Java
- Python
- C++
- HTTP
- JavaScript
- Ruby
- CSS
- Ini
- PHP
- SQL
