When parsing alerts, GitHub has two behaviors that Marko does not follow.
Case Sensitivity of Alert Types
GitHub handling of the alert type is not case sensitive. Marko only works if the type is capitalized.
>>> from marko.ext.gfm import gfm
>>> gfm('> [!note]\n> Content')
'<blockquote>\n<p>[!note]\nContent</p>\n</blockquote>\n'
Content Handling After Alert Type
GitHub does not allow custom titles after the alert type like Obsidian does. If GitHub encounters anything after the alert type, on the same line, it will treat the block as a normal blockquote. Marko throws away this content and renders an alert. Text should not get thrown away.
> [!NOTE] Not allowed
> Content
[!NOTE] Not allowed
Content
>>> from marko.ext.gfm import gfm
>>> gfm('> [!NOTE] Not allowed\n> Content')
'<blockquote class="alert alert-note">\n<p>Note</p>\n<p>Content</p>\n</blockquote>\n'
When parsing alerts, GitHub has two behaviors that Marko does not follow.
Case Sensitivity of Alert Types
GitHub handling of the alert type is not case sensitive. Marko only works if the type is capitalized.
Note
Content
Content Handling After Alert Type
GitHub does not allow custom titles after the alert type like Obsidian does. If GitHub encounters anything after the alert type, on the same line, it will treat the block as a normal blockquote. Marko throws away this content and renders an alert. Text should not get thrown away.