-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add BiDi support #408
Comments
I'm open to adding BiDi, but very fuzzy on exactly what would be added to pulldown-cmark to support it. Are you suggesting an extension to the CommonMark language to indicate paragraph directionality? |
I do suggest to add This is completely practical and nondestructive. Anytime it can be replaced with the newer (if any) solution. As far as I follow discussions, nobody is taking any action to solve this issue. I guess Gitlab is doing the same thing I am proposing here. |
Yes, I'm interested in seeing what other CommonMark / markdown implementers are doing here. If there's consensus that adding |
Can you share some resources in this regard? I am not hopeful anyone come to any conclusion anytime soon. This is not priority for many people. Otherwise they could propose some solution long time ago. Still I think bidi is practical and not destructive. it doesn't change thing except adding little attributes to rendered html. anytime it can be undone without any harm |
From scrapping the web a bit on it, there seems to be very few actual implementations of markdown supporting rtl languages. Some people seems to agree that If I may add my grain of salt, pulldown-cmark should add |
Gitlab does the same: add As a Persian speaking person, I have found this method more logical. I prefer this method as it is easy to understand by people, it doesn't need any complex implementation and it doesn't need any additional syntax. I can do all my formatting on Gitlab just because it adding this attribute to each block of text. |
I think it is better you implement what I am proposing. I am sure you can prove others that this is the right way of doing it. Markdown should remain as simple as possible. it is not supposed to support complex and rare cases of formatting text. As a Persian speaking person who is dealing with this issue, I am telling you this method is doing the job perfectly. Show others that it works. |
Hi again I have made a Firefox add-on called Add Bidi Spport to demonstrate how my approach would work for adding bidi support to websites. Please install and use it in some websites and see the impact. It is not made to solve the issue on all websites but to show how with a very simple approach, the issue can be efficiently resolved. Share your comments. You may activate the addon and use it on showdownjs with the following text:
There are some fixes needed for lists but as you can see, it works perfect. Share your concerns with me so that I can improve my solution. This issue must be resolved once for ever. |
Any update in this regard? Please see my article on Plume which contains both RTL and LTR text. You can use my add-bidi-support firefox addon to see how effectively it resolves the issue. This is the comparison between the two (with and without bidi support): |
I'm not sure whether there's an actionable proposal here, and also not sure whether it's better taken up as a proposed enhancement of CommonMark. |
The actionable proposal is presented above. my addon is just an attempt to show how it works. It seems nobody is interested in addressing this issue. I have proposed it on CommonMark forum but nobody replies. If there is any better way to approach please let me know. There are many projects suffering from this issue. |
I talked with CommonMark team to add this to spec, but they sayed it is not an issue for spec, it is about implemention:
So you can add this to Pulldown-Cmark. It is not incompatible with CommonMark specs, if you add this. |
This seems like a task for an external HTML renderer, as #637. |
If you mean the rendered in the browser, I don't think so. Browser will render what we in HTML and CSS define. Even in Android development, such issues have their own directives and styles. Unless browsers decide to add |
No, I mean an external crate generating the HTML from the events of this crate. Note that the purpose of this crate is parsing Markdown, and the HTML renderer is only a basic one that will surely be separated in optional features as proposed in #519 and #526 (it will not probably be removed because it is useful for tests). That external crate could have many options and for instance reading them from a TOML file, something much more convenient that tweaking arguments in this crate. Also note that the initial implementation of that crate can be very similar to a copy-paste of the html and escaping modules of this project, and from that starting point growing to a full-featured Markdown to HTML converter. |
#645 has been created to track all requested features that would fit in a new full-featured HTML renderer crate. |
Since Markdown doesn't have any specific tag to specify the direction of [a given block of] a text, and since there are many cases in which the text body is mixed with RTL and LTR text, there is a need to detect the direction of the text automatically based on the context.
This feature is extremely need to be implemented in whatever possible way but the most feasible solution (as per my understanding) is to apply bidirection (bidi) to the render engine so it pass the responsibility of dealing with direction to the browser.
The text was updated successfully, but these errors were encountered: