From 73d16da4873659df86ac693bebed73b759858298 Mon Sep 17 00:00:00 2001 From: yangjian Date: Sun, 31 Jan 2021 15:57:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84Editor.md=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E6=96=87=E6=9C=AC=E9=AB=98=E4=BA=AE=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/editor.md/editormd.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/editor.md/editormd.js b/static/editor.md/editormd.js index b2d29e6..3bb94e6 100644 --- a/static/editor.md/editormd.js +++ b/static/editor.md/editormd.js @@ -3472,7 +3472,7 @@ atLink : /@(\w+)/g, email : /(\w+)@(\w+)\.(\w+)\.?(\w+)?/g, emailLink : /(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g, - mark : /[^]==([^\s=])==(?!=)|[^]==([^\s=])==(?!=)|[^]==([^\s][\s\S]*?[^\s])==(?!=)|[^]==([^\s][\s\S]*?[^\s])==(?!=)/g, + mark : /==([^\s][^\<\/code\>][\s\S]*?[^\s])==(?!=)/g, emoji : /:([A-Za-z\+-]+):/g, emojiDatetime : /(\d{2}:\d{2}:\d{2})/g, twemoji : /:(tw-([\w]+)-?(\w+)?):/g, @@ -3740,11 +3740,11 @@ // marked 高亮标记解析 markedRenderer.mark = function(text){ if(markReg.test(text)){ - console.log(text) + // console.log(1,text) var mark_replace_reg = /==(.+)==/g text = text.replace(markReg,function(e){ - console.log(e) - return "" + e.replace(mark_replace_reg,function($1,$2){console.log($2); return $2}) + "" + // console.log(2,e) + return "" + e.replace(mark_replace_reg,function($1,$2){return $2}) + "" }) } return text