Explorar o código

Fix syntax highlighting for markdown code blocks on issue description/comment save

Florian Kaiser %!s(int64=9) %!d(string=hai) anos
pai
achega
0d41827f23
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      public/js/gogs.js

+ 3 - 0
public/js/gogs.js

@@ -385,6 +385,9 @@ function initRepository() {
                             } else {
                             } else {
                                 $render_content.html(data.content);
                                 $render_content.html(data.content);
                                 emojify.run($render_content[0]);
                                 emojify.run($render_content[0]);
+                                $('pre code', $render_content[0]).each(function(i, block) {
+                                    hljs.highlightBlock(block);
+                                });
                             }
                             }
                         });
                         });
                 });
                 });