summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorWu Cheng-Han2016-09-18 17:05:29 +0800
committerWu Cheng-Han2016-09-18 17:05:29 +0800
commit9b5856fff0e089ef97a2b2f60c1b3a94b01852f3 (patch)
treed1f77acfeb6972bbf98dcbf79a3a2677296415e2 /public
parent748957dc9e1b7f2b6e62fb446b2985729b469da8 (diff)
Fix text complete extra tags for blockquote and referral shouldn't match after the target search and referral regex now need two spaces when after some text

Diffstat (limited to 'public')
-rw-r--r--public/js/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 41618ccf..0a4395ee 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -3759,7 +3759,7 @@ $(editor.getInputField())
}
},
{ //extra tags for blockquote
- match: /(?:^|\n|\s)(\>.*|\s|)((\^|)\[(\^|)\](\[\]|\(\)|\:|))(\w*)$/,
+ match: /(?:^|\n|\s)(\>.*|\s|)((\^|)\[(\^|)\](\[\]|\(\)|\:|)\s*\w*)$/,
search: function (term, callback) {
var line = editor.getLine(editor.getCursor().line);
quote = line.match(this.match)[1].trim();
@@ -3805,7 +3805,7 @@ $(editor.getInputField())
}
},
{ //referral
- match: /(^|\n|\s)(\!(\[\]|)(\[\]|\(\)|))(\w*)$/,
+ match: /(^\s*|\n|\s{2})((\[\]|\[\]\[\]|\[\]\(\)|\!|\!\[\]|\!\[\]\[\]|\!\[\]\(\))\s*\w*)$/,
search: function (term, callback) {
callback($.map(supportReferrals, function (referral) {
return referral.search.indexOf(term) === 0 ? referral.text : null;