Skip to content

Commit

Permalink
run highlight.js on markdown preview
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Gnehr <michael@gnehr.de>
  • Loading branch information
Cherrg committed Jun 20, 2019
1 parent 6e55a29 commit 84f3b4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,9 @@ function initWikiForm() {
function (data) {
preview.innerHTML = '<div class="markdown">' + data + '</div>';
emojify.run($('.editor-preview')[0]);
$(preview).find('pre code').each(function(_,e){
hljs.highlightBlock(e);
});
}
);
};
Expand Down

0 comments on commit 84f3b4f

Please sign in to comment.