rust-lang / rust-lang/mdBook

No RTL Support & Search not working for languages like arabic or persian!

Open
#2,316 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

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:

#content > main:nth-child(1) > * {
    text-align: start;
    unicode-bidi: plaintext;
}

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!

Screenshot from 2024-02-13 22-36-07

Steps
  1. Make a new project
  2. Write some Persian/Arabic Text in it
  3. Search for the Persian/Arabic Text
Possible Solution(s)

No response

Notes

No response

Version
mdbook v0.4.37

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing both problems in a new mdBook project using Persian or Arabic text, following the listed steps. Inspect the generated content styling and search behavior, then verify that RTL layout works across the affected page elements and that Arabic/Persian queries return matching text.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, rust
Domain
frontend, internationalization, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.