Skip to content

fix(test): mark whole character as incorrect for multi code point characters (@AmanJ24) - #8549

Open
AmanJ24 wants to merge 1 commit into
monkeytypegame:masterfrom
AmanJ24:fix/tamil-grapheme-error-highlight
Open

AmanJ24 wants to merge 1 commit into
monkeytypegame:masterfrom
AmanJ24:fix/tamil-grapheme-error-highlight

Conversation

@AmanJ24

@AmanJ24 AmanJ24 commented Nov 1, 2026 •

Copy link
Copy Markdown

Typing a wrong vowel sign in சோ only turned that part red. Monkeytype was highlighting each Unicode code point separately, even though the browser displays them as one character. When I reproduced it in Firefox, I saw half the glyph turn red, while the issue report described the whole word turning white.

I used Intl.Segmenter to find the boundaries of visible characters in the target word, so a mistake in any part marks the whole character as incorrect. This only changes the highlighting. Nothing else changes. I also added tests for Tamil and combining characters in other scripts.

The tests pass, and I checked the behaviour in Firefox. Some Indic conjuncts, such as க்ஷ and ஶ்ரீ, aren't covered yet, and character grouping may differ between browsers.

Closes #8453

Before:
before-vowel-sign-wrong

After:
after-vowel-sign-wrong

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tamil typing test: Incorrect error highlighting for vowel sign substitutions

2 participants