Open nimafanniasl opened 8 months ago
Thanks for the report! To support RTL, you need to set the book.text-direction
option (see docs).
As for search support, that is tracked in #1081.
Hey! Thanks so much.
Also, is there a way to have English text be LTR and Persian/Arabic text automatically be RTL with the config file or does this still need custom css?
I don't think there is an automatic way to handle that based on the script. You can wrap text in something like <div dir="ltr">
to switch it.
That's right. Search non-English languages are not supported. But for RTL, you can handle it like these:
<ul dir="rtl">
<li>صفحه اصلی</li>
</ul>
or
<p dir="rtl">سلام</p>
Hi! Yeah, but setting it manually isn't a good way to do it, But the CSS I shared above works fine as a custom CSS and does this automatically :)
#content > main:nth-child(1) > * {
text-align: start;
unicode-bidi: plaintext;
}
The main problem for me is the search not working for Persian text :)
Any new progress on this issue?
Problem
Hey! I'm working on a website with mdBook that is written in Persian and I stumbled upon these issues:
First: There is no RTL support. I fixed the problem at least for the content itself in the book with this CSS:
But still, as you can see, some parts aren't fixed with this fix.
I think it's a simple fix, but it's really needed!
Second problem: Search doesn't work for Arabic/Persian text but works perfectly for English!
Steps
Possible Solution(s)
No response
Notes
No response
Version