Kaynağa Gözat

Merge pull request #2542 from fnkr/fix-markdown-code-blocks-issue-comment-save

Fix syntax highlighting for markdown code blocks on issue description/comment save
Unknwon 9 yıl önce
ebeveyn
işleme
a93af59b36
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      public/js/gogs.js

+ 3 - 0
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);
+                                });
                             }
                         });
                 });