Skip to content

Commit 400280c

Browse files
committed
Match markedjs behavior for parsing HTML linebreaks
1 parent 8fa95b8 commit 400280c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nbconvert/filters/markdown_mistune.py

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ def output_latex_environment(self, m):
106106

107107
class MarkdownWithMath(mistune.Markdown):
108108
def __init__(self, renderer, **kwargs):
109+
# This makes mistune behave more like markedjs
110+
# (markedjs behing used by Jupyter Notebook and JupyterLab)
111+
kwargs["parse_block_html"] = True
112+
kwargs["hard_wrap"] = True
113+
109114
if "inline" not in kwargs:
110115
kwargs["inline"] = MathInlineLexer
111116
if "block" not in kwargs:

0 commit comments

Comments
 (0)