Don't automatically add mentions for incomplete &/@/% links.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4328 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
48c47f097a
commit
f018c367ed
@ -37,6 +37,11 @@ class TfComposeElement extends LitElement {
|
||||
for (let match of text.matchAll(/\[([^\[]+)]\(([@&%][^\)]+)/g)) {
|
||||
let name = match[1];
|
||||
let link = match[2];
|
||||
if ((link.startsWith('&') && link.length != 52) ||
|
||||
(link.startsWith('@') && link.length != 53) ||
|
||||
(link.startsWith('%') && link.length != 52)) {
|
||||
continue;
|
||||
}
|
||||
let balance = 0;
|
||||
let bracket_end = match.index + match[1].length + '[]'.length - 1;
|
||||
for (let i = bracket_end; i >= 0; i--) {
|
||||
|
Loading…
Reference in New Issue
Block a user