Use HTML <q> Tag Instead of Curly Quotes for Smart Punctuation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 12
Description
Problem
Currently, when enabling output.html.smart-punctuation, double quotes in the HTML output are rendered as curly quotes. However, these curly quotes are not appropriate or standard for many languages - as detailed in this overview.
Proposed Solution
Instead of replacing straight double quotes with curly quotes when smart-punctuation is enabled, the renderer should use the HTML <q> tag. This would allow browsers to render quotation marks according to the book's language metadata in book.toml with fallback options to the user's locale or browser language settings.
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the HTML renderer implementation for output.html.smart-punctuation and trace how double quotes are transformed. Check how book.toml language metadata is available to generated HTML. Done means smart punctuation emits the HTML q element and quotation rendering can follow the book language or documented browser fallbacks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100