Make blockquote attention recognize more syntaxes (#31240)

Fix #31214
This commit is contained in:
2024-06-04 23:35:29 +08:00
committed by GitHub
parent fcc061ae44
commit bd80225ec3
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>")
}