When the MyST's extension smartquotes is enabled, e.g. the double quotes are automatically converted to their opening/closing variants, but only in their English form, whatever the language specified in the conf.py file.
More specifically, with language=fr in conf.py and the MyST's extension smartquotes:
enabled,"Test" is converted into “Test”,
disabled, "Test" is converted into « Test ».
Expected Behavior
The MyST's extension smartquotes should honor localized rules.
To Reproduce
Create a minimal Sphinx documentation project, with the following conf.py file:
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'Test smartquotes'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
source_suffix = ['.rst', '.md']
# smartquotes = True
extensions = [
'myst_parser',
]
myst_enable_extensions = [
# "smartquotes",
]
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
language = 'fr'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster'
html_static_path = ['_static']
What version of
myst-parser
are you using?2.0.0
What version dependencies are you using?
sphinx
What operating system are you using?
Linux
Describe the Bug
When the MyST's extension
smartquotes
is enabled, e.g. the double quotes are automatically converted to their opening/closing variants, but only in their English form, whatever thelanguage
specified in theconf.py
file.More specifically, with
language=fr
inconf.py
and the MyST's extensionsmartquotes
:"Test"
is converted into “Test”,"Test"
is converted into « Test ».Expected Behavior
The MyST's extension
smartquotes
should honor localized rules.To Reproduce
Create a minimal Sphinx documentation project, with the following
conf.py
file:and the following
index.md
file: