`dir: rtl` isn't written to `<html>` in HTML output
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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".
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 302
- フォーク
- 22
- 平均マージ
- 5時間 2分
- マージ済み PR(30日)
- 213
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/q2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/q2#1188 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
quarto-dev/q2#1179 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
quarto-dev/q2#1133 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quarto-dev/q2#1103 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/q2#1095 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
Selected chart highlights only its values, not its series names and category labels対応中かも @Higgs32584 が今日担当しました。 オープンbug priority: low ui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
storytold/gridcraft#4390 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug bugfix priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BurntSushi/jiff#713 ·
メンテナーはふだん 1 日以内に返信