From 0d41827f23c04678f1ff7db236d5150cc8ee539d Mon Sep 17 00:00:00 2001 From: Florian Kaiser Date: Mon, 1 Feb 2016 22:48:04 +0000 Subject: [PATCH] Fix syntax highlighting for markdown code blocks on issue description/comment save --- public/js/gogs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/gogs.js b/public/js/gogs.js index 71f4859c3..345965858 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -385,6 +385,9 @@ function initRepository() { } else { $render_content.html(data.content); emojify.run($render_content[0]); + $('pre code', $render_content[0]).each(function(i, block) { + hljs.highlightBlock(block); + }); } }); });