-
-
Notifications
You must be signed in to change notification settings - Fork 895
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
RTL - LTR (bidi) text rendering between paragraphs #197
Comments
@adueck can you share an example of what you are trying and what you expect the output to be? |
Here's an example. Just adding |
Thanks for sharing! It would be good to get this fixed upstream in CommonMark, then have it make it's way to Remark and React Markdown. In the mean time, this can be achieved through by creating a remark plugin (or rehype plugin if #428 is merged) https://unifiedjs.com/learn, which adds the |
Non-markdown syntax is not something for this project. But indeed, it could be done with plugins. |
I solved this like so, <div dir="auto">
<ReactMarkdown children={'اسلام علیکم'} />
</div> |
If you start the markdown text in LTR, but then write a paragraph of RTL, the RTL paragraph doesn't get rendered properly. (And vice versa)
I would suggest the simplest solution to this is to add a
dir="auto"
attribute to all<p></p>
elements that get created. This would take care of things nicely.If people don't want the extra
dir="auto"
in every<p>
element, perhaps this could be enabled by an option something likeenableBidiParagraphs
?The text was updated successfully, but these errors were encountered: