From c9fcfc686218dbca6511ce4046a8e3c253ded9c7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 9 Nov 2020 22:32:01 +0900 Subject: [PATCH] Better MFM rendering --- src/client/components/mfm.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/components/mfm.ts b/src/client/components/mfm.ts index d83cd4152..1960461a1 100644 --- a/src/client/components/mfm.ts +++ b/src/client/components/mfm.ts @@ -130,9 +130,13 @@ export default defineComponent({ break; } } - return h('span', { - style: 'display: inline-block;' + style, - }, genEl(token.children)); + if (style == null) { + return h('span', {}, ['[', token.node.props.name, ...genEl(token.children), ']']); + } else { + return h('span', { + style: 'display: inline-block;' + style, + }, genEl(token.children)); + } } case 'small': {