xoofx / markdig

A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
BSD 2-Clause "Simplified" License
4.41k stars 456 forks source link

Alerts are not recognized when they include a title #809

Open mkoppmann opened 4 months ago

mkoppmann commented 4 months ago

Obsidian allows adding titles to alerts/callouts. When Markdig parses an alert with a title, it is recognized as a QuoteBlock instead of an AlertBlock. It would be nice if Markdig could support the optional title.

> [!NOTE] Custom Title
> Lorem Ipsum

The behavior is consistent with the way GitHub displays alerts with titles though:

[!NOTE] Custom Title Lorem Ipsum

xoofx commented 4 months ago

The behavior is consistent with the way GitHub displays alerts with titles though:

Yes, markdig implements the official GitHub Alert. You can GitHub to add support to title maybe here

szalkerous commented 3 months ago

I noticed the Typora editor creates these as well and they aren't handled in many parsers. I'd love to see this implemented, either natively or via a plugin.