don't preview if hightlight mode is not markdown
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user