parent
5ab7e03804
commit
b517d76084
5 changed files with 11 additions and 7 deletions
|
@ -238,6 +238,12 @@ export default function(props: MfmProps) {
|
|||
style = `background-color: #${color};`;
|
||||
break;
|
||||
}
|
||||
case 'ruby': {
|
||||
const child = token.children[0];
|
||||
const text = child.type === 'text' ? child.props.text : '';
|
||||
return h('ruby', {
|
||||
}, [text.split(' ')[0], h('rt', text.split(' ')[1])]);
|
||||
}
|
||||
}
|
||||
if (style == null) {
|
||||
return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children, scale), ']']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue