diff --git a/public/res/extensions/markdownExtra.js b/public/res/extensions/markdownExtra.js index e03e1be3..9e95acdf 100644 --- a/public/res/extensions/markdownExtra.js +++ b/public/res/extensions/markdownExtra.js @@ -95,7 +95,8 @@ define([ var previewContentsElt = document.getElementById('preview-contents'); editor.hooks.chain("onPreviewRefresh", function() { _.each(previewContentsElt.querySelectorAll('.prettyprint > code'), function(elt) { - hljs.highlightBlock(elt); + !elt.highlighted && hljs.highlightBlock(elt); + elt.highlighted = true; }); }); }