Steps to reproduce
-
start a new note in Obsidian
-
insert the U+200E LEFT-TO-RIGHT MARK
-
write some RTL text after the mark
-
in a new line insert the U+200F RIGHT-TO-LEFT MARK
-
write some LTR text after the mark
-
now in a new line insert the U+061C ARABIC LETTER MARK
-
write some LTR text after the mark
Here’s an exemple text: (make sure you add the invisible marks in the beginning of every line)
مرحبا
LTR text after ARABIC LETTER MARK
LTR text after ARABIC LETTER MARK
Did you follow the troubleshooting guide? [Y]
Expected result
According to Right-to-left - Developer Documentation:
When editing a file, the
dir
attribute is set tortl
orltr
per line on.cm-line
elements by detecting the first strongly directional character.
The LEFT-TO-RIGHT MARK and RIGHT-TO-LEFT MARK should (by definition) be treated like other strongly directional characters.
The RIGHT-TO-LEFT MARK and ARABIC LETTER MARK should be treated in the same way.
Actual result
The LEFT-TO-RIGHT MARK and RIGHT-TO-LEFT MARK has no effect to the text direction, unlike ARABIC LETTER MARK and all other strongly directional characters. (See the screenshot)
Environment
SYSTEM INFO:
Obsidian version: v1.6.3
Installer version: v1.6.3
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
Resolving this issue will let the user manually decide the text direction of each line. That’s very useful when dealing with a mix of both LTR and RTL languages within the same note.
The new automatic detection of text direction introduced in Obsidian 1.6 but unfortunately isn’t always good. In many cases, it becomes a real mess, for example if you make a bulleted list with both LTR and RTL text. That’s confirmed by many RTL users in this forum.