MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

No break between aligned html table in notebook output and next cell

Open RubendeBruin opened this issue 5 years ago • 4 comments
trafficstars

Describe the bug

When a cell output contains an aligned HTML table, then the next cell in the book output is rendered next to it:

afbeelding

To Reproduce

Steps to reproduce the behavior:

html_table = """
<table align="left" border="1">
<tr><td>Single cell, single row table</td></tr>
</table>
"""

from IPython.core.display import display, HTML

display(HTML(html_table))

Expected behavior

I would expect the next cell to be shown below the table:

afbeelding

Environment

  • Python Version 3.8
  • Package versions or output of jupyter-book --version:
Jupyter Book: 0.7.4
MyST-NB: 0.8.5
Sphinx Book Theme: 0.0.35
MyST-Parser: 0.9.1
Jupyter-Cache: 0.3.0
  • Operating System: Ubuntu 20.04 on WSL2

RubendeBruin avatar Aug 28 '20 09:08 RubendeBruin

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Aug 28 '20 09:08 welcome[bot]

A simple fix is to add <BR CLEAR=LEFT> as html after the table

RubendeBruin avatar Aug 28 '20 10:08 RubendeBruin

Weird! yeh cheers, this is something to look into in myst-nb, so I will move it there

chrisjsewell avatar Aug 28 '20 12:08 chrisjsewell

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Aug 28 '20 12:08 welcome[bot]