Skip to content

Use HTML <q> Tag Instead of Curly Quotes for Smart Punctuation #2723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
GiFuJo opened this issue Jun 1, 2025 · 1 comment
Open

Use HTML <q> Tag Instead of Curly Quotes for Smart Punctuation #2723

GiFuJo opened this issue Jun 1, 2025 · 1 comment
Labels
A-HTML Area: HTML Rendering A-Localization Area: Localization, language support, etc. C-enhancement Category: Enhancement or feature request

Comments

@GiFuJo
Copy link

GiFuJo commented Jun 1, 2025

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

@GiFuJo GiFuJo added the C-enhancement Category: Enhancement or feature request label Jun 1, 2025
@ehuss ehuss added A-HTML Area: HTML Rendering A-Localization Area: Localization, language support, etc. labels Jun 2, 2025
@steffahn
Copy link
Member

steffahn commented Jun 8, 2025

<q> elements in HTML have fairly bad/broken (and also browser-dependent) UX.

Compare e.g. the points raised at https://github.com/whatwg/html/issues/10216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-HTML Area: HTML Rendering A-Localization Area: Localization, language support, etc. C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

3 participants