MyST-Parser icon indicating copy to clipboard operation
MyST-Parser copied to clipboard

Specify the first- and second-level quotes for the smartquotes extension

Open jppellet opened this issue 4 years ago • 3 comments

Description / Summary

The smartquotes extension will output curly quotes “” and ‘’ instead of "" and '', which is great. But not all languages use these quotes. It would be great to have a way to specify them.

Value / benefit

Better support for non-English languages

Implementation details

Custom quotes can directly be passed to the md instance as markdown-it supports this. The "quotes" option of md is an array of four strings that specify opening and closing first- and second-level string. For instance, it could be set to ['«\u202F', '\u202F»', '“', '”'] for French.

Tasks to complete

No response

jppellet avatar Aug 26 '21 13:08 jppellet

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Aug 26 '21 13:08 welcome[bot]

Heya, yeh cheers it should be quite easy to add to https://github.com/executablebooks/MyST-Parser/blob/be4838c35d374a51427a92a2736b29a9abc018d4/myst_parser/main.py#L31

chrisjsewell avatar Aug 26 '21 13:08 chrisjsewell

Ideally it should be configured according to the language set in sphinx.

Kamik423 avatar Oct 25 '23 15:10 Kamik423