From ff7c7535e35d89348e780d805ecfe388a45c9a76 Mon Sep 17 00:00:00 2001 From: FineArchs <133759614+FineArchs@users.noreply.github.com> Date: Thu, 22 Aug 2024 08:52:33 +0900 Subject: [PATCH 1/6] Update MkMisskeyFlavoredMarkdown.ts --- .../components/global/MkMisskeyFlavoredMarkdown.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts index 0d869892bd..8637fa972f 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts @@ -16,6 +16,7 @@ import MkCode from '@/components/MkCode.vue'; import MkCodeInline from '@/components/MkCodeInline.vue'; import MkGoogle from '@/components/MkGoogle.vue'; import MkSparkle from '@/components/MkSparkle.vue'; +import MkUrlPreview from '@/components/MkUrlPreview.vue'; import MkA, { MkABehavior } from '@/components/global/MkA.vue'; import { host } from '@/config.js'; import { defaultStore } from '@/store.js'; @@ -388,12 +389,16 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext Date: Thu, 22 Aug 2024 10:09:44 +0900 Subject: [PATCH 2/6] fix --- .../frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts index 8637fa972f..311002ede8 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts @@ -396,7 +396,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext Date: Thu, 22 Aug 2024 11:56:08 +0900 Subject: [PATCH 3/6] Update extract-url-from-mfm.ts --- packages/frontend/src/scripts/extract-url-from-mfm.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/extract-url-from-mfm.ts b/packages/frontend/src/scripts/extract-url-from-mfm.ts index d5654ba850..23c689782a 100644 --- a/packages/frontend/src/scripts/extract-url-from-mfm.ts +++ b/packages/frontend/src/scripts/extract-url-from-mfm.ts @@ -11,8 +11,11 @@ import { unique } from '@/scripts/array.js'; const removeHash = (x: string) => x.replace(/#[^#]*$/, ''); export function extractUrlFromMfm(nodes: mfm.MfmNode[], respectSilentFlag = true): string[] { + const quotedUrlNodes = mfm.extract(nodes, (node) => { + return (node.type === 'quote') && (node.children.length === 1) && (node.children[0].type === 'url'); + }).map(quote => quote.children[0]); const urlNodes = mfm.extract(nodes, (node) => { - return (node.type === 'url') || (node.type === 'link' && (!respectSilentFlag || !node.props.silent)); + return (node.type === 'url' && !quotedUrlNodes.includes(node)) || (node.type === 'link' && (!respectSilentFlag || !node.props.silent)); }); const urls: string[] = unique(urlNodes.map(x => x.props.url)); From 2511a5c17b59d4294fe0ad83ebb91a237ee168d6 Mon Sep 17 00:00:00 2001 From: FineArchs <133759614+FineArchs@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:10:39 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/global/MkMfm.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/global/MkMfm.ts b/packages/frontend/src/components/global/MkMfm.ts index 09d5ea4a93..e8429d0c57 100644 --- a/packages/frontend/src/components/global/MkMfm.ts +++ b/packages/frontend/src/components/global/MkMfm.ts @@ -404,9 +404,13 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext Date: Thu, 10 Oct 2024 11:36:49 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/global/MkMfm.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/frontend/src/components/global/MkMfm.ts b/packages/frontend/src/components/global/MkMfm.ts index e8429d0c57..20875cb09b 100644 --- a/packages/frontend/src/components/global/MkMfm.ts +++ b/packages/frontend/src/components/global/MkMfm.ts @@ -408,7 +408,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext Date: Thu, 10 Oct 2024 12:53:45 +0900 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8909c15da..16645b3f21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - ### Client -- +- Enhance: 新しいMFM「URL引用」を追加。`> https://hogehoge.com`のように、`> `に続けてURLを置くことで文中にURLプレビューを展開することができます ### Server -