cocalc
cocalc copied to clipboard
Implement more robust <div> tag html parsing in markdown (custom styling)
Description
Given the following markdown cell with HTML content:
<div style="background-color: red">
<b>Custom CSS styling</b>
This notebook uses custom CSS styling. If you don't see this text on a colored background, make sure to not view it on GitHub, but instead in VSCode (or another editor that can render Jupyter notebooks with custom CSS).
<br><br>
</div>
On CoCalc, this does not render the background in a red color. It does so, if you remove the empty line after the opening div tag, but then only for the "Custom CSS styling" part. It seems that newlines are not respected here.
However, newlines are respected in markdown-it
, see this example in their online demo. Therefore, I'm wondering why this is not working in CoCalc, which is leveraging markdown-it
for markdown cells.