Fixed highlight.js problem with partial rendering
This commit is contained in:
parent
c5a1497374
commit
3c37584b40
@ -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;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user