mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
ruby mfm
This commit is contained in:
parent
bb13125935
commit
54a84e11c1
1 changed files with 11 additions and 0 deletions
|
@ -320,6 +320,17 @@ export default defineComponent({
|
||||||
style = `border: ${width}px ${b_style} ${color}; border-radius: ${radius}px;${token.props.args.noclip ? '' : ' overflow: clip;'}`;
|
style = `border: ${width}px ${b_style} ${color}; border-radius: ${radius}px;${token.props.args.noclip ? '' : ' overflow: clip;'}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'ruby': {
|
||||||
|
if (token.children.length === 1) {
|
||||||
|
const child = token.children[0];
|
||||||
|
let text = child.type === 'text' ? child.props.text : '';
|
||||||
|
return h('ruby', {}, [text.split(' ')[0], h('rt', text.split(' ')[1])]);
|
||||||
|
} else {
|
||||||
|
const rt = token.children.at(-1)!;
|
||||||
|
let text = rt.type === 'text' ? rt.props.text : '';
|
||||||
|
return h('ruby', {}, [...genEl(token.children.slice(0, token.children.length - 1), scale), h('rt', text.trim())]);
|
||||||
|
}
|
||||||
|
}
|
||||||
case "small": {
|
case "small": {
|
||||||
return h(
|
return h(
|
||||||
"small",
|
"small",
|
||||||
|
|
Loading…
Reference in a new issue