Skip to content

Replace the custom smartypants code with docutils’ smart_quotes #3345

@mitya57

Description

@mitya57

Sphinx currently uses its own code to handle the html_use_smartypants option. However, that uses a hard-coded set of quotes for every language: “” and ‘’.

That is not optimal for some languages: i.e. in Russian we use «», and in German „“ are used instead.

Docutils has a smartquotes.py file since version 0.10 (released in 2012), which provides support for 27 different languages, and takes the current block language into account.

Sphinx already depends on docutils ≥ 0.11, so in my opinion the custom code for smartypants can be dropped, and the html_use_smartypants can be mapped directly to docutils’ smart_quotes configuration option.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions