diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-12 08:43:48 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-12 08:43:48 +0900 |
| commit | 1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2 (patch) | |
| tree | 19e9424f777d983a5d90a53e9b99c09c5b3ebfe5 | |
| parent | :art: (diff) | |
| download | sharkey-1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2.tar.gz sharkey-1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2.tar.bz2 sharkey-1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2.zip | |
冗長なハッシュタグの表示を無くした
| -rw-r--r-- | src/client/app/common/views/components/note-html.ts | 8 |
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) { |