don't preview if hightlight mode is not markdown

pull/1/head
ansuz 8 years ago
parent fd83ae3e61
commit c5bb830757

@ -111,6 +111,7 @@ define([
}; };
var drawPreview = Cryptpad.throttle(function () { var drawPreview = Cryptpad.throttle(function () {
if (CodeMirror.highlightMode !== 'markdown') { return; }
DiffMd.apply(DiffMd.render(editor.getValue()), $preview); DiffMd.apply(DiffMd.render(editor.getValue()), $preview);
}, 150); }, 150);

Loading…
Cancel
Save