Skip to content

Commit

Permalink
pandoc: disable "smart" option only for version 2.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Mar 14, 2023
1 parent 71a12c6 commit e79b3fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nbsphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,11 @@ def filter_func(text):

input_format = 'markdown'
input_format += '-implicit_figures'
input_format += '-smart' # Smart quotes etc. are handled by Sphinx
v = nbconvert.utils.pandoc.get_pandoc_version()
if nbconvert.utils.version.check_version(v, '1.13'):
input_format += '-native_divs+raw_html'
if nbconvert.utils.version.check_version(v, '2.0'):
input_format += '-smart' # Smart quotes etc. are handled by Sphinx

rststring = pandoc(text, input_format, 'rst', filter_func=filter_func)
rststring = re.sub(
Expand Down

0 comments on commit e79b3fd

Please sign in to comment.