Refactor markdown attention render (#29833)

* Remove some deadcode
* Use 2-word name for CSS class names
* Remove "gt-*" rules for sanitizer

The UI doesn't change much.
This commit is contained in:
wxiaoguang 2024-03-16 19:34:38 +08:00 committed by GitHub
parent 1262ff6734
commit 66902d89e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 38 deletions

View file

@ -175,13 +175,6 @@ func NewColorPreview(color []byte) *ColorPreview {
}
}
// IsColorPreview returns true if the given node implements the ColorPreview interface,
// otherwise false.
func IsColorPreview(node ast.Node) bool {
_, ok := node.(*ColorPreview)
return ok
}
// Attention is an inline for an attention
type Attention struct {
ast.BaseInline