client: implement small/center MFM functions
ci/woodpecker/push/lint-client Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-backend Pipeline failed Details
ci/woodpecker/push/lint-sw Pipeline failed Details
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/test Pipeline failed Details

Changelog: Added
This commit is contained in:
Johann150 2024-04-20 17:48:42 +02:00
parent c18a7a8d30
commit a9c6e51051
Signed by: 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'];