From 8b16ead35cc3905b627d3bdae54d052bf02b5b09 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Fri, 24 Nov 2023 16:43:03 +0100 Subject: [PATCH] fix handling of plain MFM tag --- packages/client/src/components/mfm.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index 2d04a9731..320883192 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -51,6 +51,10 @@ export default defineComponent({ const genEl = (ast: mfm.MfmNode[]) => ast.map((token): VNode | VNode[] => { switch (token.type) { + case 'plain': + // for some reason `` is a token which just wraps a single text node + token = token.children[0]; + // fallthrough case 'text': { const text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');