From 2dbf171e244c407fbc099cd0aa5d012bf58adcc8 Mon Sep 17 00:00:00 2001 From: yangjian Date: Sun, 31 Jan 2021 14:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84Markdown=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E9=AB=98=E4=BA=AE=E6=A0=87=E8=AE=B0=E6=AD=A3=E5=88=99=E5=8C=B9?= =?UTF-8?q?=E9=85=8D?= 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 4ab7bd7..b2d29e6 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=])==(?!=)|[^]==([^\s=])==(?!=)|[^]==([^\s][\s\S]*?[^\s])==(?!=)|[^]==([^\s][\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(text) var mark_replace_reg = /==(.+)==/g text = text.replace(markReg,function(e){ - // console.log(e) - return "" + e.replace(mark_replace_reg,function($1,$2){return $2}) + "" + console.log(e) + return "" + e.replace(mark_replace_reg,function($1,$2){console.log($2); return $2}) + "" }) } return text