summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/components/note-html.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/app/common/views/components/note-html.ts b/src/client/app/common/views/components/note-html.ts
index f86b50659e..2fa13b16e1 100644
--- a/src/client/app/common/views/components/note-html.ts
+++ b/src/client/app/common/views/components/note-html.ts
@@ -40,6 +40,14 @@ export default Vue.component('mk-note-html', {
ast = this.ast;
}
+ if (ast.filter(x => x.type != 'hashtag').length == 0) {
+ return;
+ }
+
+ while (ast[ast.length - 1].type == 'hashtag') {
+ ast.pop();
+ }
+
// Parse ast to DOM
const els = flatten(ast.map(token => {
switch (token.type) {