diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index 2c8b3e3ed..e2b8823f7 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -212,6 +212,16 @@ export default defineComponent({ style = `background-color: #${color};`; break; } + case 'small': { + return h('small', { + class: '_mfm_small_' + }, genEl(token.children)); + } + case 'center': { + return h('div', { + style: 'text-align:center;', + }, genEl(token.children)); + } } if (style == null) { return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children), ']']); diff --git a/packages/client/src/scripts/mfm-tags.ts b/packages/client/src/scripts/mfm-tags.ts index 84415f400..604380fc0 100644 --- a/packages/client/src/scripts/mfm-tags.ts +++ b/packages/client/src/scripts/mfm-tags.ts @@ -1 +1 @@ -export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'font', 'blur', 'rainbow', 'sparkle', 'rotate', 'position', 'scale', 'fg', 'bg']; +export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'font', 'blur', 'rainbow', 'sparkle', 'rotate', 'position', 'scale', 'fg', 'bg', 'small', 'center'];