SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[mod] replace Markdown parser mistletoe by markdown-it-py
Markus Heiser921528123263
diff --git a/docs/conf.py b/docs/conf.pyindex 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 = {diff --git a/requirements.txt b/requirements.txtindex f638008eb..8d673bc8a 100644--- a/requirements.txt+++ b/requirements.txt@@ -14,5 +14,5 @@ httpx-socks[asyncio]==0.7.2langdetect==1.0.9setproctitle==1.2.2redis==4.2.0-mistletoe==0.8.2+markdown-it-py==2.0.1typing_extensions==4.1.1diff --git a/searx/infopage/__init__.py b/searx/infopage/__init__.pyindex 44f3bdbd7..143f523d8 100644--- a/searx/infopage/__init__.py+++ b/searx/infopage/__init__.py@@ -29,7 +29,7 @@ import typingimport urllib.parseimport jinja2from flask.helpers import url_for-import mistletoe+from markdown_it import MarkdownItfrom .. import get_settingfrom ..compat import cached_property@@ -71,13 +71,17 @@ class InfoPage:@cached_propertydef html(self):- """Render Markdown (CommonMark_) to HTML by using mistletoe_.+ """Render Markdown (CommonMark_) to HTML by using markdown-it-py_... _CommonMark: https://commonmark.org/- .. _mistletoe: https://github.com/miyuchina/mistletoe+ .. _markdown-it-py: https://github.com/executablebooks/markdown-it-py"""- return mistletoe.markdown(self.content)+ return MarkdownIt(+ "commonmark", {"typographer": True}+ ).enable(+ ["replacements", "smartquotes"]+ ).render(self.content)def get_ctx(self): # pylint: disable=no-self-use"""Jinja context to render :py:obj:`InfoPage.content`"""