Skip to content

Commit

Permalink
markdown: Fix bullet list parsing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
douglas-raillard-arm committed Sep 11, 2024
1 parent f7647f2 commit 595124e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nbsphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 595124e

Please sign in to comment.