-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct the direction of the Persian language text #1670
base: stable
Are you sure you want to change the base?
Conversation
Thanks, @Mazafard, but I think we can achieve this in a simpler way. Could you look at #1671? The live client with this patch is deployed to https://freefeed-freefeed-react-client-preview-pr-1671.surge.sh/ |
@davidmz Yeah, definitely. Thank you. Your solution is quite clever and addresses many scenarios. 💯 I particularly appreciate how it handles links and hashtags in a neat and straightforward manner. However, it lacks a mode, requiring me to resort to regex. This is especially the case when the text contains both Persian and English words, and notably when the text doesn't begin with Persian words, like in this example I've combined your PR with mine and made a slight adjustment before sending it back to you. 👍 |
We have an ambiguity here. From your point of view this text is mostly in Farsi, but from my point of view it's more in English, and should be left-aligned:) But if we want a smarter definition, we need a smarter algorithm as well. In your variant, one Arabic character in a long English text would be enough to switch to RTL mode. |
@davidmz I'm on the same page as you. I'm currently developing a new approach. |
I have a few conclusions after the today's public test:
|
@Mazafard @davidmz
I have tested this, and it correctly aligns the content as desired. Please find a screenshot attached demonstrating the proper rendering. Let me know if this solution works for you or if you need any further assistance. |
Fix the issue: Linkify does not function correctly with RTL text, particularly for Persian texts. #1546 #1547