fix indentation of script/style tags
1 file changed, 1 insertion(+), 5 deletions(-)
changed files
M format.go → format.go
@@ -177,7 +177,7 @@ return } } if !isVoidElement(n) { - if err = printChildren(w, n, isPreFormatted(n.Data), level+1); err != nil { + if err = printChildren(w, n, n.Data == "pre", level+1); err != nil { return } if isSpecialContentElement(n) || !hasSingleTextChild(n) {@@ -212,10 +212,6 @@ return } } return -} - -func isPreFormatted(s string) bool { - return s == "pre" || s == "script" || s == "style" } func printChildren(w io.Writer, n *html.Node, pre bool, level int) (err error) {