Actually split on new lines

This commit is contained in:
2021-11-05 00:02:02 +01:00
parent 90d7fe9a81
commit dd066f0aa3
2 changed files with 10 additions and 2 deletions

View File

@@ -9,7 +9,10 @@ export default class Output {
say(string) {
const node = document.createElement("p");
node.appendChild(document.createTextNode(string));
string.split("\n").forEach((line) => {
node.appendChild(document.createTextNode(line));
node.appendChild(document.createElement("br"));
});
this.history.appendChild(node);
// this.tts.speak(string);
}