Add font MFM syntax

This commit is contained in:
syuilo
2020-12-31 19:42:23 +09:00
parent 296cbc2e5a
commit 078b043cae
3 changed files with 25 additions and 0 deletions

View File

@ -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_',