Skip to content

Commit 0bf33a6

Browse files
authored
Update script.js
1 parent dc75377 commit 0bf33a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ function streamMessage(cssClass, text) {
7676
msg.classList.add("message", cssClass);
7777
chat.appendChild(msg);
7878

79+
// Splits tekst in regels
7980
const lines = text.split("\n").filter(line => line.trim() !== "");
8081

8182
const isNumberedList = lines.length > 1 && lines.every(line => /^\d+\.\s+/.test(line.trim()));
@@ -98,6 +99,7 @@ function streamMessage(cssClass, text) {
9899
}
99100
}, 200);
100101
} else {
102+
// Toon gewone tekst met typewriter-effect
101103
let index = 0;
102104
const interval = setInterval(() => {
103105
if (index < text.length) {

0 commit comments

Comments
 (0)