RTL Languages Support

It’s mind-blowing that not a single flavor of markdown tried to address the localization issue. RTL (right-to-left) languages should be represented correctly in the rendered document (HTML or not). There’s been fragmented discussions on how to best work that in, some suggested using some right-pointing brackets ‘>’ before any RTL text and others chimed in variations of that.

I believe text in RTL languages should be treated just like any other text, except when rendered, where the parser should hopefully have a mechanism to detect RTL text blocks and adding the necessary ‘dir=“rtl”’ paragraphs.

Twitter has a js library that detects if the text being entered in from an RTL language and adjusts the direction directly. https://github.com/twitter/RTLtextarea Something like that should be worked into the parser itself.


Good point. I suppose one big question is whether an RTL mode should enable you to write Markdown special syntax RTL too, since otherwise when you are typing RTL you’ll have to write them “backwards”.

So for example in RTL mode an image link like hello world ![alt text](http://blah.com)

could be this:

(http://blah.com)[alt text]! مرحبا العالم

(disclaimer - arabic supposedly says “hello world” according to google, no way to verify)
Although since URLs remain LTR you get an odd mix of text directions.

Note that there is already a topic about RTL.

I have shared my thought on this matter here: Explicit RTL indication in pure Markdown

1 Like