Use highlight.js right.

This commit is contained in:
Denis Bardadym 2013-11-14 12:12:59 +04:00
parent ea4877cdde
commit 78b8aa860e

View File

@ -61,7 +61,7 @@ define([
options.highlighter = "prettify";
var previewContentsElt = document.getElementById('preview-contents');
editor.hooks.chain("onPreviewRefresh", function() {
_.each(previewContentsElt.querySelectorAll('.prettyprint'), function(elt) {
_.each(previewContentsElt.querySelectorAll('.prettyprint > code'), function(elt) {
hljs.highlightBlock(elt);
});
});