AmirTheFree/obsidian-dynamic-rtl

Lines/paragraphs starting with numbers issue

Closed this issue · 4 comments

First of all, thanks for the awesome plugin.
I just noticed that when a line/paragraph (I'm not talking about numbered lists here) starts with a number it treats it as an LTR writing even if what follows is RTL language. This might be due to the fact that numbers in Obsidian always appear in arabic format not hindi, even when the system works with hindi numerals.
So, I was hoping there is a way to let the plugin detect the text after the numerals to decide which direction it will take.
thanks in advance and keep up the great work

I'm not sure if I could understand your issue or not.
Do you mean this:
1
I could not see any problems in Linux & Android version in this mode.
Or this??
2323

Thank you for your prompt reaction.

I'm using desktop version on Windows 10
image

No matter what I do, I can't see hindi numbers in Obsidian, I mean like the second line in your second picture. Could this be the problem? Could it be Obsidian-related? or Windows-related?
When the line starts with numbers followed by RTL words it woks fine, the line is Right aligned.
My problem is with the lines consisting of numbers only, and they don't appear as hindi number. is there a way to make them appear Hindi numbers and right aligned (adjusting the Hindi/Arabic numbers in Windows setting doesn't affect Obsidian at all)
Is there any way I can fix this, or may be you can find a way to fix it with your plugin?
Thanks in advance

Showing Hindi numbers or not depends on the font which you are using. You can change the font from Obsidian's settings 👉 appearance part. I used Vazirmatn font in the example. 👉 Font's Arabic page link 👈
But about the direction I must work on it. I hope I can fix it soon in the reading view (May be in a week) but for editing view it isn't that easy as the reading view; may be I fix this in future.

I forgotted something:
As numbers in all languages are written in LTR I think I must set the RTL mode for Hindi numbers as an optional feature which requires the settings part for the plugin. May be I do this in future. for now I will close this as complete; you can comment or reopen this issue or open another issue anytime you would like.
But for showing Hind numbers try changing your font.