Skip to content

Commit 84f3b4f

Browse files
committed
run highlight.js on markdown preview
Signed-off-by: Michael Gnehr <[email protected]>
1 parent 6e55a29 commit 84f3b4f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

public/js/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,9 @@ function initWikiForm() {
11541154
function (data) {
11551155
preview.innerHTML = '<div class="markdown">' + data + '</div>';
11561156
emojify.run($('.editor-preview')[0]);
1157+
$(preview).find('pre code').each(function(_,e){
1158+
hljs.highlightBlock(e);
1159+
});
11571160
}
11581161
);
11591162
};

0 commit comments

Comments
 (0)