From 1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 12 Jun 2018 08:43:48 +0900 Subject: [PATCH] =?UTF-8?q?=E5=86=97=E9=95=B7=E3=81=AA=E3=83=8F=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=82=BF=E3=82=B0=E3=81=AE=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=82=92=E7=84=A1=E3=81=8F=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/views/components/note-html.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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) {