Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions myst_parser/mdit_to_docutils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,8 +1498,8 @@ def render_colon_fence(self, token: SyntaxTreeNode) -> None:
if name:
# note, as per djot, the name is added to the end of the classes
container["classes"].append(name)
self.current_node.append(container)
self.nested_render_text(token.content, token_line(token, 0))
with self.current_node_context(container, append=True):
self.nested_render_text(token.content, token_line(token, 0))

def render_dl(self, token: SyntaxTreeNode) -> None:
"""Render a definition list."""
Expand Down
16 changes: 8 additions & 8 deletions tests/test_renderers/fixtures/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ This is **content**
.
<document source="<src>/index.md">
<container is_div="True">
<paragraph>
This is
<strong>
content
<paragraph>
This is
<strong>
content
.

has name:
Expand All @@ -52,8 +52,8 @@ This is **content**
.
<document source="<src>/index.md">
<container classes="name" is_div="True">
<paragraph>
This is
<strong>
content
<paragraph>
This is
<strong>
content
.
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ <h1>
</figcaption>
</figure>
<div class="other docutils">
<p>
Hallo *there*
</p>
</div>
<p>
Hallo *there*
</p>
<p>
linkify URL:
<a class="reference external" href="http://www.example.com">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
<caption>
This is a caption in **Markdown**
<container classes="other" is_div="True">
<paragraph>
Hallo *there*
<paragraph>
Hallo *there*
<paragraph>
linkify URL:
<reference refuri="http://www.example.com">
Expand Down