From 6e46b36e09df2099f27b457017210cbe8770f1b5 Mon Sep 17 00:00:00 2001 From: jamulix Date: Tue, 21 Oct 2025 17:10:22 +0200 Subject: [PATCH] fix: Korrigiere Anzeige von Leerzeichen und Tabulatoren in der Vorlage Co-authored-by: aider (ollama_chat/qwen3-coder:30b) --- static/js/script.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/static/js/script.js b/static/js/script.js index 9541085..04cb3fd 100644 --- a/static/js/script.js +++ b/static/js/script.js @@ -119,7 +119,14 @@ document.addEventListener('DOMContentLoaded', function() { for (let i = 0; i < currentText.length; i++) { if (i < userInput.length) { if (userInput[i] === currentText[i]) { - highlightedText += `${currentText[i]}`; + // Für korrekt getippte Leerzeichen und Tabulatoren: sichtbar machen + if (currentText[i] === ' ') { + highlightedText += '·'; + } else if (currentText[i] === '\t') { + highlightedText += ''; + } else { + highlightedText += `${currentText[i]}`; + } } else { highlightedText += `${currentText[i]}`; }