File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 44
55package 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- }
You can’t perform that action at this time.
0 commit comments