Skip to content

Commit

Permalink
修正识别问题
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Dec 3, 2013
1 parent a8399ef commit b9cf37d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions admin/js/pagedown.js
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,16 @@ else
}

function _DoItalicsAndBold(text) {
// <strong> must go first:
text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,
"<strong>$2</strong>");

text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,
"<em>$2</em>");

return text;

/*
// <strong> must go first:
text = text.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,
"$1<strong>$3</strong>$4");
Expand All @@ -1095,6 +1104,7 @@ else
"$1<em>$3</em>$4");
return text;
*/
}

function _DoBlockQuotes(text) {
Expand Down

0 comments on commit b9cf37d

Please sign in to comment.