Skip to content

Commit a7d97f9

Browse files
committed
fix: bottomUpTraverse() skips ListBlock items
This was a pre-existing bug that affected all content inside list items (not just our new Markdown lists, but also existing `@li` ones).
1 parent 3032165 commit a7d97f9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/mrdocs/Metadata/DocComment.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,18 @@ traverseImpl(NodeTy& N, F&& func)
255255
{
256256
traverseImpl<bottomUp>(N.exception, func);
257257
}
258+
259+
if constexpr (std::same_as<NodeTy, doc::ListBlock>)
260+
{
261+
for (auto& item: N.items)
262+
{
263+
for (auto& block: item.blocks)
264+
{
265+
traverseImpl<bottomUp>(block, func);
266+
}
267+
}
268+
}
269+
258270
if constexpr (bottomUp && std::invocable<F, NodeTy&>)
259271
{
260272
func(N);

0 commit comments

Comments
 (0)