fix " " message again

This commit is contained in:
Yaode_owo 2024-07-08 14:03:05 -04:00
parent bdd087315f
commit f9e729d648

8
a.js
View file

@ -79,11 +79,13 @@ function parseMinecraftMessage(component) {
text += "\x1b[5m" // useless
}
if (comp.text && comp.text.value) {
text += comp.text.value;
}
text += comp.text.value;
} else if (!comp.text) {
text += " ";
}
if (comp.extra && comp.extra.value && Array.isArray(comp.extra.value.value)) {
comp.extra.value.value.forEach(subComp => {
if (subComp === " ") { text += " "; } else { text += extractText(subComp); };
if (subComp === " ") { text += extractText(subComp)+" "; } else { text += extractText(subComp); };
});
}
if (comp.color && ansiCodes[comp.color.value]) {