summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-12 08:43:48 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-12 08:43:48 +0900
commit1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2 (patch)
tree19e9424f777d983a5d90a53e9b99c09c5b3ebfe5
parent:art: (diff)
downloadsharkey-1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2.tar.gz
sharkey-1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2.tar.bz2
sharkey-1af50fd7b89e2e7c117a00a9e0ad731c4a30f0a2.zip
冗長なハッシュタグの表示を無くした
-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) {