1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-08 11:37:20 +00:00

Make blockquote attention recognize more syntaxes (#31240) (#31250)

Backport #31240 by wxiaoguang

Fix #31214

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-06-05 00:03:01 +08:00
committed by GitHub
parent 082600a50e
commit 1c1c2d36e8
3 changed files with 87 additions and 20 deletions

View File

@ -1010,4 +1010,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>")
}