ganjoorandroid/app
anas b3f4e527f1 Look up the word, not the word and the comma after it
A tapped word was taken as the longest run of characters in U+0600–U+06FF, but
that block is not only letters. The Arabic comma ، semicolon ؛ question mark ؟
full stop ۔ and both sets of Indic digits all live inside it, so the run ran
straight through them: tapping دستم in «ز دستم، صاحب‌دلان» looked up «دستم،»,
which no dictionary carries and which the near-word search cannot rescue either,
since the punctuation counts against every candidate's letter overlap.

The run now keeps only letters, the marks that sit on them, and the joiner,
decided by Unicode category rather than a hand-kept list of code points. Harakat
and tatweel stay in: they sit inside a word — منِ is one word — and normalise()
strips them before the lookup. Latin punctuation already fell outside the block.

The range is also what the verse highlights, so the comma is no longer painted
as part of the tapped word.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-07 17:08:19 +02:00
..
src Look up the word, not the word and the comma after it 2026-10-07 17:08:19 +02:00
.gitignore Initial Android Studio Compose scaffold 2026-10-03 22:16:22 +02:00
build.gradle.kts Pin poets to the home screen 2026-10-04 20:26:26 +02:00