How is syntax highlighting expected to work?
Closed this issue · 3 comments
jskeet commented
I'm using Markdown like this:
```csharp
// Some C# code
```
And it generates HTML like this:
<pre>
<code class="language-csharp">
// Some C# code
</code>
</pre>
That's great in terms of CommonMark.NET parsing - it definitely understands my Markdown properly. But the output isn't syntax-highlighted as I'd like it to be. Is there a known syntax-highlighting library/stylesheet which works well with this? It doesn't seem to be what Prettify expects, for example.
Apologies if this has already been covered somewhere - I haven't found it in the issues.
Knagis commented
highlight.js supports this syntax for code blocks out of the box.
jskeet commented
Great, thanks. I now need to sort out some other aspects of my CSS, but this is great :)
tiesont commented
Prism.js will also work: http://prismjs.com/