client: implement small/center MFM functions

Changelog: Added
This commit is contained in:
Johann150 2024-04-20 17:48:42 +02:00
parent c18a7a8d30
commit a9c6e51051
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 11 additions and 1 deletions

View file

@ -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), ']']);

View file

@ -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'];