mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 11:43:59 -05:00
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
This commit is contained in:
parent
748957dc9e
commit
9b5856fff0
1 changed files with 2 additions and 2 deletions
|
@ -3759,7 +3759,7 @@ $(editor.getInputField())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ //extra tags for blockquote
|
{ //extra tags for blockquote
|
||||||
match: /(?:^|\n|\s)(\>.*|\s|)((\^|)\[(\^|)\](\[\]|\(\)|\:|))(\w*)$/,
|
match: /(?:^|\n|\s)(\>.*|\s|)((\^|)\[(\^|)\](\[\]|\(\)|\:|)\s*\w*)$/,
|
||||||
search: function (term, callback) {
|
search: function (term, callback) {
|
||||||
var line = editor.getLine(editor.getCursor().line);
|
var line = editor.getLine(editor.getCursor().line);
|
||||||
quote = line.match(this.match)[1].trim();
|
quote = line.match(this.match)[1].trim();
|
||||||
|
@ -3805,7 +3805,7 @@ $(editor.getInputField())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ //referral
|
{ //referral
|
||||||
match: /(^|\n|\s)(\!(\[\]|)(\[\]|\(\)|))(\w*)$/,
|
match: /(^\s*|\n|\s{2})((\[\]|\[\]\[\]|\[\]\(\)|\!|\!\[\]|\!\[\]\[\]|\!\[\]\(\))\s*\w*)$/,
|
||||||
search: function (term, callback) {
|
search: function (term, callback) {
|
||||||
callback($.map(supportReferrals, function (referral) {
|
callback($.map(supportReferrals, function (referral) {
|
||||||
return referral.search.indexOf(term) === 0 ? referral.text : null;
|
return referral.search.indexOf(term) === 0 ? referral.text : null;
|
||||||
|
|
Loading…
Reference in a new issue