`dir: rtl` isn't written to `<html>` in HTML output
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Read crates/quarto-core/src/template.rs, especially the two <html> templates at lines 145 and 259. Render the provided dir: rtl example and inspect the generated <html> tag. Done means both templates include the document direction when set, and the rendered tag contains dir="rtl".
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
This issue was written by Claude while adding q2 support to Great Docs. The output shown comes from running each repro.
Bug description
A document's dir option sets the text direction. Quarto 1 writes it on the root element as
dir="rtl". q2 accepts the option and Lua filters see it in meta.dir, but the HTML templates
don't write it: crates/quarto-core/src/template.rs:145 and :259 are
<html$if(lang)$ lang="$lang$"$endif$>. So Arabic, Hebrew, Persian and Urdu pages render
left-to-right.
Great Docs sets dir: rtl for sites in those languages. Under q2, Great Docs' filter records the
direction in a <meta> tag, and a post-render script adds it to <html>.
Steps to reproduce
mkdir rtl && cd rtl
printf -- '---\ntitle: RTL\nlang: ar\ndir: rtl\n---\n\nمرحبا\n' > index.qmd
q2 render index.qmd
grep -o '<html[^>]*>' index.html
Actual behavior
<html lang="ar">
Expected behavior
As in Quarto 1.9.37:
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar" dir="rtl">
The dir attribute is the part that matters. Adding $if(dir)$ dir="$dir$"$endif$ to both
templates' <html> tags would do it, as in Pandoc's HTML5 template.
- Ngôn ngữ chính
- Rust
- Star
- 302
- Fork
- 22
- Merge trung bình
- 5 giờ 2 phút
- Pull request đã merge (30 ngày)
- 213
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/q2
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
quarto-dev/q2#1188 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
quarto-dev/q2#1179 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
quarto-dev/q2#1133 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
quarto-dev/q2#1103 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
quarto-dev/q2#1095 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/q2
Issue tương tự
-
Selected chart highlights only its values, not its series names and category labelsCó thể đã có người làm @Higgs32584 đã nhận hôm nay. Đang mởbug priority: low ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
storytold/gridcraft#4390 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug bugfix priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
BurntSushi/jiff#713 ·
Maintainer thường phản hồi trong vòng 1 ngày