Open krlng opened 2 years ago
Are you sure the output HTML is valid? Can you provide a reproducable example?
I thing I found the reason. mknotebooks has a problem with a HTML outputs where a </div>
directly followed by a \n
.
It can be fixed by placing an empty space between those
html_str = """
<div><span>with_space 1</span></div>
<div><span>without_space 2</span></div>
<div><span>with_space 3</span></div>
<div><span>without_space 4</span></div>
<div><span>with_space 5</span></div>
"""
from IPython.display import HTML
HTML(html_str.replace("\n"," \n")) # works
HTML(html_str) # breaks for heading 3 and 5, so always in lines without a space between </div> and \n
Which version of nbconvert
is installed?
nbconvert-6.1.0-py3, habe jetzt aber auch noch auf 6.3 geupdated, ändert nichts. MacOS 11.6
mknotebooks does not display the output of a cell correctly, if that output contains HTML. It looks like it breaks the output of a cell at the first
</div>
tag, even if that one is nested within the actual cell-output and therefore should not close the whole cell-output.In the jupyter notebook it get's rendered correctly:
While within the mknotebooks-docs only the first can be displayed and the second already gets a new output cell: