Open derberg opened 10 years ago
Should probably look into some of the async vs sync highlighting suggestions on https://github.com/chjj/marked#highlight
Is this fixed?
I tested with your code and it worked perfectly.
editor.on('update', function () {
document.querySelector('#epiceditor-preview').innerHTML = this.exportFile(null, 'html');
$(document).ready(function() {
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
});
}).emit('update');
added usage for highlight.js
almost all if fine except of "no-highlight" usage it just doesn't work because of the problem with one regex in epiceditor.js
I had to add/change the following to accept "-" as well:
It is still some kind of workaround because epiceditor.js is adding languages reference in the following way: lang-no-highlight hljs css
correct generated class should be: