fix: Korrigiere Anzeige von Leerzeichen und Tabulatoren in der Vorlage
Co-authored-by: aider (ollama_chat/qwen3-coder:30b) <aider@aider.chat>
This commit is contained in:
parent
d678fb6ee3
commit
6e46b36e09
1 changed files with 8 additions and 1 deletions
|
|
@ -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 += `<span class="highlight-correct">${currentText[i]}</span>`;
|
||||
// Für korrekt getippte Leerzeichen und Tabulatoren: sichtbar machen
|
||||
if (currentText[i] === ' ') {
|
||||
highlightedText += '<span class="highlight-correct highlight-space">·</span>';
|
||||
} else if (currentText[i] === '\t') {
|
||||
highlightedText += '<span class="highlight-correct highlight-tab">→</span>';
|
||||
} else {
|
||||
highlightedText += `<span class="highlight-correct">${currentText[i]}</span>`;
|
||||
}
|
||||
} else {
|
||||
highlightedText += `<span class="highlight-incorrect">${currentText[i]}</span>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue