basshelal / Wudooh

Browser extension that allows Arabic script modifications for clarity and customization
https://wudooh.app
MIT License
85 stars 7 forks source link

Minor bug: Any open-brackets immediately after Arabic text are treated as Arabic text. #27

Open edderiofer opened 3 years ago

edderiofer commented 3 years ago

See for instance this image:

image

The open-parenthesis after "وُضُوح", despite containing English text, is marked by the extension as Arabic text and thus enlarged.

This appears to occur on Chrome (v86.0.4240.198, 64-bit), Windows 10.

To reproduce:

  1. Have the extension installed on Chrome.
  2. Set font size to 157%, line height to 128%, and font to "سهل زسخ".
  3. View any page where an open-parenthesis containing non-Arabic text immediately follows Arabic text (e.g. this one).
  4. The open-parenthesis will be the same size as the Arabic text before and considerably larger than the following close-parenthesis.

(Obviously this is pretty low-priority, but I thought I should report it for documentation's sake. Still, I'm enjoying the extension nonetheless and I'm finding any Arabic easier to read now from the increased size and non-system font.)

basshelal commented 3 years ago

Thanks for your input! I appreciate you contributing to the project even with something as minor as this 😊

Likely this is something to do with the regex used to check if a node contains Arabic script text, it seems we may have to add some kind of end condition that will be something like "end when any non-Arabic specific symbol appears, such as digits or symbols), something along these lines but it's a little tricky to get right.

I'll keep this on the backlog for now