From 8679f63127c0a22cbe28a3c5753d125825779d7b Mon Sep 17 00:00:00 2001 From: jp-knj Date: Mon, 8 Sep 2025 01:28:53 +0900 Subject: [PATCH] refactor: remove unused function --- internal/const.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/internal/const.go b/internal/const.go index 370a3185d..3aad85779 100644 --- a/internal/const.go +++ b/internal/const.go @@ -4,8 +4,6 @@ package astro -import a "golang.org/x/net/html/atom" - // Section 12.2.4.2 of the HTML5 specification says "The following elements // have varying levels of special parsing rules". // https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements @@ -111,26 +109,3 @@ func isSpecialElement(element *Node) bool { } return false } - -var knownDirectiveMap = map[string]bool{ - "client:load": true, - "client:idle": true, - "client:visible": true, - "client:only": true, - "class:list": true, - "set:text": true, - "set:html": true, -} - -func IsKnownDirective(element *Node, attr *Attribute) bool { - if knownDirectiveMap[attr.Key] { - return true - } - if element.DataAtom == a.Script { - return attr.Key == "hoist" - } - if element.DataAtom == a.Style { - return attr.Key == "global" - } - return false -}