fix script tag
This commit is contained in:
parent
80d3538d87
commit
72e3383e75
1 changed files with 11 additions and 0 deletions
|
|
@ -103,6 +103,17 @@ func (n *CustomNode) String() string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if str == "h.Script(" {
|
||||||
|
if len(n.Attrs) > 0 {
|
||||||
|
for _, attr := range n.Attrs {
|
||||||
|
if attr.key == "h.Src" {
|
||||||
|
str = str + fmt.Sprintf(`"%s"`, attr.value) + ","
|
||||||
|
n.Attrs = make([]Attr, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
booleanAttributes := []string{
|
booleanAttributes := []string{
|
||||||
"h.AllowFullscreen",
|
"h.AllowFullscreen",
|
||||||
"h.Async",
|
"h.Async",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue