From 84f3b4f84cdf219428bc559e3ecc7c01e03b3758 Mon Sep 17 00:00:00 2001 From: Michael Gnehr Date: Thu, 20 Jun 2019 03:59:55 +0200 Subject: [PATCH] run highlight.js on markdown preview Signed-off-by: Michael Gnehr --- public/js/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/index.js b/public/js/index.js index 8358c2ef5ed6d..eba527527b88d 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1154,6 +1154,9 @@ function initWikiForm() { function (data) { preview.innerHTML = '
' + data + '
'; emojify.run($('.editor-preview')[0]); + $(preview).find('pre code').each(function(_,e){ + hljs.highlightBlock(e); + }); } ); };