Skip to content

Commit 8679f63

Browse files
committed
refactor: remove unused function
1 parent 893a703 commit 8679f63

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

internal/const.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
package astro
66

7-
import a "golang.org/x/net/html/atom"
8-
97
// Section 12.2.4.2 of the HTML5 specification says "The following elements
108
// have varying levels of special parsing rules".
119
// https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements
@@ -111,26 +109,3 @@ func isSpecialElement(element *Node) bool {
111109
}
112110
return false
113111
}
114-
115-
var knownDirectiveMap = map[string]bool{
116-
"client:load": true,
117-
"client:idle": true,
118-
"client:visible": true,
119-
"client:only": true,
120-
"class:list": true,
121-
"set:text": true,
122-
"set:html": true,
123-
}
124-
125-
func IsKnownDirective(element *Node, attr *Attribute) bool {
126-
if knownDirectiveMap[attr.Key] {
127-
return true
128-
}
129-
if element.DataAtom == a.Script {
130-
return attr.Key == "hoist"
131-
}
132-
if element.DataAtom == a.Style {
133-
return attr.Key == "global"
134-
}
135-
return false
136-
}

0 commit comments

Comments
 (0)