Browse Source

修复python代码库异步请求获取数据的时候高亮显示问题 (#920)

* 修复代码库读取缓存数据不高亮的问题

* 代码块重复点击高亮样式问题修复

---------

Co-authored-by: xiangshen <[email protected]>
xiangshenb 1 year ago
parent
commit
663eb28de2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      static/js/kancloud.js

+ 1 - 1
static/js/kancloud.js

@@ -221,7 +221,7 @@ function loadDocument($url, $id, $callback) {
 function initHighlighting() {
     try {
         $('pre,pre.ql-syntax').each(function (i, block) {
-            if ($(this).hasClass('prettyprinted')) {
+            if ($(this).hasClass('prettyprinted') || $(this).hasClass('hljs')) {
                 return;
             }
             hljs.highlightBlock(block);