From 0b88e08d819494bb8a2d4626a234a1eaa0d9ebf4 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 18 Feb 2021 22:24:40 +0900 Subject: [PATCH] fix https://github.com/syuilo/misskey/pull/7129#issuecomment-780540579 --- src/client/pages/share.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/pages/share.vue b/src/client/pages/share.vue index 14ed09b2f7..a9c31885bf 100644 --- a/src/client/pages/share.vue +++ b/src/client/pages/share.vue @@ -70,8 +70,9 @@ export default defineComponent({ let noteText = ''; if (this.title) noteText += `【${this.title}】\n`; - // titleとtext(またはtext. Googleニュースがこれを吐く)が同一であればtextを省略 - if (text && this.title !== text && this.title !== `${text}.`) noteText += `${text}\n`; + // Googleニュース対策 + if (text?.startsWith(`${this.title}.\n`)) noteText += text.replace(`${this.title}.\n`, ''); + else if (text && this.title !== text) noteText += `${text}\n`; if (url) noteText += `${url}`; this.initialText = noteText.trim();