AmirTheFree / obsidian-dynamic-rtl

Dynamic (Per line/paragraph depend on language you type) RTL/LTR support plugin for Obsidian.md
https://obsidian.md
GNU General Public License v3.0
71 stars 2 forks source link

Lines/paragraphs starting with numbers issue #5

Closed osman1963 closed 2 years ago

osman1963 commented 2 years ago

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

AmirTheFree commented 2 years ago

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

osman1963 commented 2 years ago

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

AmirTheFree commented 2 years ago

Showing Hindi numbers or not depends on the font which you are using. You can change the font from Obsidian's settings :point_right: appearance part. I used Vazirmatn font in the example. :point_right: Font's Arabic page link :point_left: 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.

AmirTheFree commented 2 years ago

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.