Skip to content

Commit 63addeb

Browse files
committed
Adopt gh:cN3rd/mdBook:rtl (rust-lang/mdBook#1641) for RTL support.
It fixes rendering issues with prev/next arrows, and it does not need altering HTML after rendering.
1 parent 0f4acf5 commit 63addeb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

user-manual/build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ mdbook build
1414
#find "$outd" -name '*.html' | xargs sed -i '/<link href="[^"]*\bfonts\.googleapis\.com\b/d'
1515

1616
# Fix output for RTL languages (needs <https://github.com/rust-lang/mdBook/pull/1489>).
17-
if grep -qE '^_direction\s*=\s*"?rtl?"' "$conf"; then
18-
book="$(sed -nE 's/^build-dir\s*=\s"([^"]+)".*/\1/p' "$conf")"
19-
find "$book" -name '*.html' -exec sed -i 's/<body /<body dir="rtl" /' '{}' ';'
20-
fi
17+
# No longer needed with <https://github.com/rust-lang/mdBook/pull/1641>.
18+
#if grep -qE '^_direction\s*=\s*"?rtl?"' "$conf"; then
19+
# book="$(sed -nE 's/^build-dir\s*=\s"([^"]+)".*/\1/p' "$conf")"
20+
# find "$book" -name '*.html' -exec sed -i 's/<body /<body dir="rtl" /' '{}' ';'
21+
#fi

user-manual/fa.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[book]
22
authors = ["Ivan Vilata-i-Balaguer", "Dmitri Vitaliev", "Jenny Ryan"]
33
language = "fa"
4-
_direction = "rtl"
4+
text_direction = "rtl"
55
multilingual = false
66
src = "fa.src"
77
title = "دفترچه‌ی راهنمای کاربر Censorship.no! (سنو)"

0 commit comments

Comments
 (0)