prettify-extension
prettify-extension copied to clipboard
Error loading the extension
I get the following error:
Uncaught Error: Extension "prettify" could not be loaded. It was either not found or is not a valid extension.
I load it as stated in the docs:
var converter = new Converter({extensions: ['prettify']});
I wonder if anyone is still actively using this extension. npm suggest that there are barely 100 weekly downloads for this extension, whereas showdowjs itself has over 300k per week. Is there some other way of "prettifying" the code without using this extension that people tend to prefer?
I recommend using PrismJS to take care of the code blocks highlighting. Showdown generates code blocks starting with this kind of markup:
<code class="js language-js">
...
PrismJS will detect the language-js
class (assuming you have installed prism with support for javascript) and it will do its job.