diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-12-31 19:42:23 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-12-31 19:42:23 +0900 |
| commit | 078b043cae4363714dbd141d594bd968ece1ffb9 (patch) | |
| tree | a763d5a85d2d4cf061e309ef456ba093a0a9f60b /src/client/components | |
| parent | :art: (diff) | |
| download | sharkey-078b043cae4363714dbd141d594bd968ece1ffb9.tar.gz sharkey-078b043cae4363714dbd141d594bd968ece1ffb9.tar.bz2 sharkey-078b043cae4363714dbd141d594bd968ece1ffb9.zip | |
Add font MFM syntax
Diffstat (limited to 'src/client/components')
| -rw-r--r-- | src/client/components/mfm.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/components/mfm.ts b/src/client/components/mfm.ts index 76399bf6f8..1590e29142 100644 --- a/src/client/components/mfm.ts +++ b/src/client/components/mfm.ts @@ -141,6 +141,18 @@ export default defineComponent({ style = `font-size: 600%;`; break; } + case 'font': { + const family = + token.node.props.args.serif ? 'serif' : + token.node.props.args.monospace ? 'monospace' : + token.node.props.args.cursive ? 'cursive' : + token.node.props.args.fantasy ? 'fantasy' : + token.node.props.args.emoji ? 'emoji' : + token.node.props.args.math ? 'math' : + null; + if (family) style = `font-family: ${family};`; + break; + } case 'blur': { return h('span', { class: '_mfm_blur_', |