We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6a4733 commit a742cf7Copy full SHA for a742cf7
modules/markup/sanitizer.go
@@ -53,11 +53,10 @@ func InitializeSanitizer() {
53
func createDefaultPolicy() *bluemonday.Policy {
54
policy := bluemonday.UGCPolicy()
55
56
- // For JS code copy
57
- policy.AllowAttrs("class").Matching(regexp.MustCompile(`^code-block$`)).OnElements("pre")
+ // For JS code copy and Mermaid loading state
+ policy.AllowAttrs("class").Matching(regexp.MustCompile(`^code-block( is-loading)?$`)).OnElements("pre")
58
59
// For Chroma markdown plugin
60
- policy.AllowAttrs("class").Matching(regexp.MustCompile(`^is-loading$`)).OnElements("pre")
61
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^(chroma )?language-[\w-]+$`)).OnElements("code")
62
63
// Checkboxes
0 commit comments