Skip to content

Commit

Permalink
Merge pull request #194 from jelovirt/feature/admonition-in-a-list-it…
Browse files Browse the repository at this point in the history
…em-fails-193

Support admonition block in list
  • Loading branch information
jelovirt authored Nov 1, 2023
2 parents 766a3d3 + 97f86de commit 66c3f70
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ private void render(final Paragraph node, final NodeRendererContext context, fin
tightList &&
parent.isOrDescendantOfType(BulletListItem.class, OrderedListItem.class) &&
!parent.isOrDescendantOfType(BlockQuote.class) &&
ListItem.class.isAssignableFrom(parent.getClass()) &&
((ListItem) parent).isTight()
) {
context.renderChildren(node);
Expand Down
10 changes: 9 additions & 1 deletion src/test/resources/dita/admonition.dita
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,13 @@
<note class="- topic/note " type="trouble">
<p class="- topic/p ">block content</p>
</note>
<ol class="- topic/ol ">
<li class="- topic/li ">
List item
<note class="- topic/note " type="note">
<p class="- topic/p ">block content</p>
</note>
</li>
</ol>
</body>
</topic>
</topic>
4 changes: 4 additions & 0 deletions src/test/resources/markdown/admonition.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ Open by default

!!! trouble ""
block content

1. List item
!!! note
block content

0 comments on commit 66c3f70

Please sign in to comment.