+
{@html tagIcon}
- en::foobar
- zh::あちこ
+
+ {#each tags as tag}
+
+ {/each}
+
+ {#if inputNew}
+ (inputNew = false)} />
+ {/if}
diff --git a/ts/editor/TagInput.svelte b/ts/editor/TagInput.svelte
new file mode 100644
index 000000000..f9ef3d167
--- /dev/null
+++ b/ts/editor/TagInput.svelte
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
diff --git a/ts/editor/TagInputEdit.svelte b/ts/editor/TagInputEdit.svelte
new file mode 100644
index 000000000..2c3c3328f
--- /dev/null
+++ b/ts/editor/TagInputEdit.svelte
@@ -0,0 +1,42 @@
+
+
+
+
diff --git a/ts/editor/TagInputNew.svelte b/ts/editor/TagInputNew.svelte
new file mode 100644
index 000000000..ab76633c3
--- /dev/null
+++ b/ts/editor/TagInputNew.svelte
@@ -0,0 +1,35 @@
+
+
+
+
diff --git a/ts/editor/tags.ts b/ts/editor/tags.ts
new file mode 100644
index 000000000..301b2fd96
--- /dev/null
+++ b/ts/editor/tags.ts
@@ -0,0 +1,16 @@
+// Copyright: Ankitects Pty Ltd and contributors
+// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
+
+export function normalizeTagname(tagname: string): string {
+ let trimmed = tagname.trim();
+
+ while (true) {
+ if (trimmed.startsWith("::")) {
+ trimmed = trimmed.slice(2).trimStart();
+ } else if (trimmed.endsWith("::")) {
+ trimmed = trimmed.slice(0, -2).trimEnd();
+ } else {
+ return trimmed;
+ }
+ }
+}
diff --git a/ts/tsconfig.json b/ts/tsconfig.json
index 91321c08f..0ef8d4f23 100644
--- a/ts/tsconfig.json
+++ b/ts/tsconfig.json
@@ -8,6 +8,7 @@
"es2019.array",
"es2018.promise",
"es2020.promise",
+ "es2019.string",
"dom",
"dom.iterable"
],