@@ -436,7 +436,7 @@ function updateWordWrapperClasses(): void {
436436 $ ( "#wordsWrapper" ) . removeClass ( "blind" ) ;
437437 }
438438
439- if ( Config . indicateTypos === "below" ) {
439+ if ( Config . indicateTypos === "below" || Config . indicateTypos === "all" ) {
440440 $ ( "#words" ) . addClass ( "indicateTyposBelow" ) ;
441441 $ ( "#wordsWrapper" ) . addClass ( "indicateTyposBelow" ) ;
442442 } else {
@@ -791,7 +791,7 @@ export async function updateActiveWordLetters(
791791 ! ( containsKorean && ! correctSoFar )
792792 ) {
793793 ret += `<letter class="dead">${
794- Config . indicateTypos === "replace"
794+ Config . indicateTypos === "replace" || Config . indicateTypos === "all"
795795 ? inputChars [ i ] === " "
796796 ? "_"
797797 : inputChars [ i ]
@@ -806,13 +806,16 @@ export async function updateActiveWordLetters(
806806 } else {
807807 ret +=
808808 `<letter class="incorrect ${ tabChar } ${ nlChar } ">` +
809- ( Config . indicateTypos === "replace"
809+ ( Config . indicateTypos === "replace" || Config . indicateTypos === "all"
810810 ? inputChars [ i ] === " "
811811 ? "_"
812812 : inputChars [ i ]
813813 : currentLetter ) +
814814 "</letter>" ;
815- if ( Config . indicateTypos === "below" ) {
815+ if (
816+ Config . indicateTypos === "below" ||
817+ Config . indicateTypos === "all"
818+ ) {
816819 const lastBlock = hintIndices [ hintIndices . length - 1 ] ;
817820 if ( lastBlock && lastBlock [ lastBlock . length - 1 ] === i - 1 )
818821 lastBlock . push ( i ) ;
@@ -839,7 +842,12 @@ export async function updateActiveWordLetters(
839842
840843 if ( hintIndices ?. length ) {
841844 const activeWordLetters = activeWord . querySelectorAll ( "letter" ) ;
842- const hintsHtml = createHintsHtml ( hintIndices , activeWordLetters , input ) ;
845+ let hintsHtml ;
846+ if ( Config . indicateTypos === "all" ) {
847+ hintsHtml = createHintsHtml ( hintIndices , activeWordLetters , currentWord ) ;
848+ } else {
849+ hintsHtml = createHintsHtml ( hintIndices , activeWordLetters , input ) ;
850+ }
843851 activeWord . insertAdjacentHTML ( "beforeend" , hintsHtml ) ;
844852 const hintElements = activeWord . getElementsByTagName ( "hint" ) ;
845853 await joinOverlappingHints ( hintIndices , activeWordLetters , hintElements ) ;
0 commit comments