diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index 5282bffde..37e454fcf 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -110,7 +110,7 @@ export default defineComponent({ case "fn": { // TODO: CSSを文字列で組み立てていくと token.props.args.~~~ 経由でCSSインジェクションできるのでよしなにやる - let style; + let style: string; switch (token.props.name) { case "tada": { const speed = validTime(token.props.args.speed) || "1s"; @@ -300,6 +300,24 @@ export default defineComponent({ style = `background-color: #${color};`; break; } + case "small": { + return h( + "small", + { + style: "opacity: 0.7;", + }, + genEl(token.children), + ); + } + case "center": { + return h( + "div", + { + style: "text-align: center;", + }, + genEl(token.children), + ); + } } if (style == null) { return h("span", {}, [ @@ -337,7 +355,7 @@ export default defineComponent({ h( "div", { - style: "text-align:center;", + style: "text-align: center;", }, genEl(token.children), ), diff --git a/packages/client/src/pages/mfm-cheat-sheet.vue b/packages/client/src/pages/mfm-cheat-sheet.vue index c17ac0804..bf85af430 100644 --- a/packages/client/src/pages/mfm-cheat-sheet.vue +++ b/packages/client/src/pages/mfm-cheat-sheet.vue @@ -460,8 +460,12 @@ let preview_emoji = $ref( instance.emojis.length ? `:${instance.emojis[0].name}:` : ":emojiname:" ); let preview_bold = $ref(`**${i18n.ts._mfm.dummy}**`); -let preview_small = $ref(`${i18n.ts._mfm.dummy}`); -let preview_center = $ref(`