Make blockquote attention recognize more syntaxes (#31240)

Fix #31214
This commit is contained in:
wxiaoguang 2024-06-04 23:35:29 +08:00 committed by GitHub
parent fcc061ae44
commit bd80225ec3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 87 additions and 20 deletions

View file

@ -1019,4 +1019,10 @@ func TestAttention(t *testing.T) {
test(`> [!important]`, renderAttention("important", "octicon-report")+"\n</blockquote>")
test(`> [!warning]`, renderAttention("warning", "octicon-alert")+"\n</blockquote>")
test(`> [!caution]`, renderAttention("caution", "octicon-stop")+"\n</blockquote>")
// escaped by mdformat
test(`> \[!NOTE\]`, renderAttention("note", "octicon-info")+"\n</blockquote>")
// legacy GitHub style
test(`> **warning**`, renderAttention("warning", "octicon-alert")+"\n</blockquote>")
}