mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-08 13:54:54 +00:00
AlertBlocks as children of non-MarkdownDocuments? #765
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @phil-scott-78 on GitHub (Dec 9, 2025).
I'm trying to use AlertBlocks - admittedly in a weird way - where they aren't direct children of a MarkdownDocument; I have them in a custom container block. In this scenario they aren't being rendered as Alerts but rather Quoteblocks.
This check in the
AlertInlineParseris what is jamming me up. Just playing around and tweaking it so we are explicitly avoiding scenarios where we are in a nested QuoteBlock seems to be sufficient to the purpose, but I might be missing scenarios where we don't want alert blocks as children elsewhere too.Happy to submit a PR if I'm not overlooking anything and this is acceptable.
@MihaZupan commented on GitHub (Dec 9, 2025):
This is similar to #853.
https://github.com/xoofx/markdig/issues/853#issuecomment-2802969888
An opt-in option that allowed it for nested containers could make sense here.
@phil-scott-78 commented on GitHub (Dec 9, 2025):
An opt-in option would be nice. I was gonna just swap out for a custom parser because my case is a bit out there, but I still need
which is internal
@phil-scott-78 commented on GitHub (Dec 10, 2025):
since this does seem to be a duplicate of #853, I'm gonna close it and move my comments over there