1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-24 07:06:26 +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) { switch (token.props.name) {
case 'ruby': { case 'ruby': {
let rb, rt, tokens; 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 != ''); const children = token.children.filter((t) => t.type != 'text' || t.props.text != '');
if (children.length == 1 && children[0].type == 'text') { if (children.length == 1 && children[0].type == 'text') {
tokens = children[0].props.text.split(" "); tokens = children[0].props.text.split(" ");