// https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts
// Five types:
// [!NOTE], [!TIP], [!WARNING], [!IMPORTANT], [!CAUTION]
-var gitHubAlertRe = regexp.MustCompile(`^<p>\[!(NOTE|TIP|WARNING|IMPORTANT|CAUTION)\]`)
+// Note that GitHub's implementation is case-insensitive.
+var gitHubAlertRe = regexp.MustCompile(`(?i)^<p>\[!(NOTE|TIP|WARNING|IMPORTANT|CAUTION)\]`)
// resolveGitHubAlert returns one of note, tip, warning, important or caution.
// An empty string if no match.
> Note triggering showing the position.
{showpos="true"}
+
+> [!nOtE]
+> Mixed case alert type.
+
+
`
b := hugolib.Test(t, files)
"Blockquote Alert Attributes: |<p>This is a tip with attributes.</p>\n|map[class:foo bar id:baz]|",
filepath.FromSlash("/content/p1.md:20:3"),
"Blockquote Alert Page: |<p>This is a tip with attributes.</p>\n|p1|p1|",
+
+ // Issue 12767.
+ "Blockquote Alert: |<p>Mixed case alert type.</p>\n|alert",
)
}