Update MkMisskeyFlavoredMarkdown.ts

This commit is contained in:
FineArchs 2024-08-22 08:52:33 +09:00 committed by GitHub
parent 043ab1f69b
commit ff7c7535e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<MfmEven
}
case 'quote': {
if (!props.nowrap) {
return [h('div', {
if (props.nowrap) {
return [h('span', {
style: QUOTE_STYLE,
}, genEl(token.children, scale, true))];
} else if (token.children.length === 1 && token.children[0].type === 'url') {
return [h(MkUrlPreview, {
url: token.children[0].props.url,
}];
} else {
return [h('span', {
return [h('div', {
style: QUOTE_STYLE,
}, genEl(token.children, scale, true))];
}