From 595124ee85dce19b05e8833c85288249f56449b1 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Thu, 5 Sep 2024 13:43:52 +0100 Subject: [PATCH] markdown: Fix bullet list parsing Jupyter markdown allows bullet list to start right after the previous element, without any blank line in between. The default settings of pandoc is to not recognize that as a bullet list. Therefore, enable the pandoc markdown extension that makes the blank line optional. --- src/nbsphinx/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nbsphinx/__init__.py b/src/nbsphinx/__init__.py index a7cd99c1..a44e8c6b 100644 --- a/src/nbsphinx/__init__.py +++ b/src/nbsphinx/__init__.py @@ -1043,7 +1043,9 @@ def filter_func(text): input_format += '-implicit_figures' v = nbconvert.utils.pandoc.get_pandoc_version() if nbconvert.utils.version.check_version(v, '1.13'): - input_format += '-native_divs+raw_html' + input_format += '-native_divs' + input_format += '+raw_html' + input_format += '+lists_without_preceding_blankline' if nbconvert.utils.version.check_version(v, '2.0'): input_format += '-smart' # Smart quotes etc. are handled by Sphinx