mirror of
https://github.com/kovetskiy/mark.git
synced 2026-03-19 09:07:36 +08:00
GenerateMkDocsAdmonitionLevel walked the AST looking for ast.KindBlockquote nodes to build a nesting-level map, but the renderer is registered for parser.KindAdmonition nodes. Because admonition nodes were never added to the map, LevelMap.Level() always returned 0 for every admonition, making the level check in renderMkDocsAdmonition a no-op. The intended behaviour (all admonitions rendered as Confluence structured macros regardless of nesting) was accidentally working because of this bug. Remove the dead MkDocsAdmonitionLevelMap type, GenerateMkDocsAdmonitionLevel function, and LevelMap field, and simplify renderMkDocsAdmonition to directly render the Confluence macro for all known admonition types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>