From b9cf37d8158f75e2136c114b31d356616b03bb7e Mon Sep 17 00:00:00 2001 From: joyqi Date: Tue, 3 Dec 2013 20:27:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AF=86=E5=88=AB=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/js/pagedown.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin/js/pagedown.js b/admin/js/pagedown.js index 49c49236..fa398f12 100644 --- a/admin/js/pagedown.js +++ b/admin/js/pagedown.js @@ -1086,7 +1086,16 @@ else } function _DoItalicsAndBold(text) { + // must go first: + text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, + "$2"); + text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, + "$2"); + + return text; + +/* // must go first: text = text.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g, "$1$3$4"); @@ -1095,6 +1104,7 @@ else "$1$3$4"); return text; +*/ } function _DoBlockQuotes(text) {