1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-27 14:28:53 +09:00
This commit is contained in:
Yuriha 2023-06-16 12:56:22 +00:00
parent 4cfd28a452
commit dc6a6dcdc3

View File

@ -88,7 +88,7 @@ export default function(props: {
switch (token.props.name) {
case 'ruby': {
let rb, rt, tokens;
token.children.forEach((t) => { if (t.type == 'text') { t.props.text = t.props.text.trim(); });
token.children.forEach((t) => { if (t.type == 'text') { t.props.text = t.props.text.trim(); } });
const children = token.children.filter((t) => t.type != 'text' || t.props.text != '');
if (children.length == 1 && children[0].type == 'text') {
tokens = children[0].props.text.split(" ");