Quellcode durchsuchen

Get rid of some useless code / 去掉一些无用代码

star7th vor 4 Jahren
Ursprung
Commit
3d894c2a57
1 geänderte Dateien mit 0 neuen und 16 gelöschten Zeilen
  1. 0 16
      web_src/src/components/common/Editormd.vue

+ 0 - 16
web_src/src/components/common/Editormd.vue

@@ -441,23 +441,7 @@ export default {
       $('#' + this.id + ' table thead tr').css('color', '#fff')
 
       // 代码块美化
-      $('#' + this.id + ' .linenums').css('padding-left', '5px')
-      // $("#"+this.id+" .linenums li").css("list-style-type","none") ; //这句代码的副作用是把代码块里的换行符也去掉了
-      // 为了弥补上面那句代码失去换行符的漏洞,所以用这个补丁代替
-      $('#' + this.id + ' .linenums li code').each(function() {
-        if (
-          $(this)
-            .find('span')
-            .text()
-        ) {
-          // 假如子元素非空,那就不是换行,从而设置style none。这样就不会误伤把换行符所在的li也设置none了。
-          $(this)
-            .parent()
-            .css('list-style-type', 'none')
-        }
-      })
 
-      $('#' + this.id + ' .linenums li').css('background-color', '#fcfcfc')
       $('.markdown-body pre').css('background-color', '#fcfcfc')
       $('.markdown-body pre').css('border', '1px solid #e1e1e8')