-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I'm seeing inconsistent behavior between CB and hand-written HTML, and it's preventing me from rendering <pre> blocks correctly.
Minimal example:
from customblocks.utils import Markdown as cbMarkdown
from customblocks.utils import E as cbE
def cb_pre(ctx, *args, **kwargs):
return cbE(
f"pre",
ctx.content
)(Note this is not using cbMarkdown, which does re-render block elements if I substitute it for ctx.content.)
Input markdown:
<pre>
*Don't render me as italic*
- I don't have a markdown list either
</pre>
::: pre
*Don't render me as italic*
- I don't have a markdown list eitherOutput HTML:
<pre>*Don't render me as italic*
- I don't have a markdown list either
</pre>
<pre><em>Don’t render me as italic</em>
- I don’t have a markdown list either
</pre>Note how the list is not rendered in either case, and the customblock is not wrapped in a <p> block element, but the italics are rendered.
Expected output HTML:
<pre>*Don't render me as italic*
- I don't have a markdown list either
</pre>
<pre>*Don't render me as italic*
- I don't have a markdown list either
</pre>Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working