Primitive display of recent channels/tags and the same on messages.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4329 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-06-22 00:27:27 +00:00
parent f018c367ed
commit 6022001d66
5 changed files with 62 additions and 7 deletions

View File

@ -37,11 +37,6 @@ 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--) {
@ -159,7 +154,6 @@ class TfComposeElement extends LitElement {
size: buffer.length ?? buffer.byteLength,
};
let edit = self.renderRoot.getElementById('edit');
self.notify(draft);
edit.value += `\n![${name}](${id})`;
self.change();
self.input();