From 921528123263e03002682399df055f50aa891b82 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 6 Apr 2022 15:49:50 +0200 Subject: [mod] replace Markdown parser mistletoe by markdown-it-py There are several reasons why we should prefer markdown-it-py over mistletoe: - Get identical rendering results in SearXNG's `/info` pages and the SearXNG's project documentation which is build by Sphinx-doc. In the Sphinx-doc we use the MyST parser to render Markdown and the MyST parser itself is built on top of the markdown-it-py package. - markdown-it-py has a typographer that supports *replacements* and *smartquotes* (e.g. em-dash, copyright, ellipsis, ...) [1] - markdown-it-py is much more flexible compared to mistletoe [2] - markdown-it-py is the fastest CommonMark compliant parser in python [3] [1] https://markdown-it-py.readthedocs.io/en/latest/using.html#typographic-components [2] https://markdown-it-py.readthedocs.io/en/latest/plugins.html [3] https://markdown-it-py.readthedocs.io/en/latest/other.html#performance Signed-off-by: Markus Heiser --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index 5db9e8178..0e2244a2e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -126,6 +126,10 @@ extensions = [ 'notfound.extension', # https://github.com/readthedocs/sphinx-notfound-page ] +myst_enable_extensions = [ + "replacements", "smartquotes" +] + suppress_warnings = ['myst.domains'] intersphinx_mapping = { -- cgit v1.2.3