all repos — htmlformat @ b2ad303afe2088678466e863dfbb8b8f92c00807

Go package and CLI tool used to format HTML

add newline between non-inline element siblings

Alan Pearce
commit

b2ad303afe2088678466e863dfbb8b8f92c00807

parent

c802f397618c8fb1f52254ebc0e0dd2345a828d1

1 file changed, 1 insertion(+), 0 deletions(-)

changed files
M format.goformat.go
@@ -208,6 +208,7 @@ return
} if n.NextSibling == nil || + (n.NextSibling.Type == html.ElementNode && !isInlineElement(n.NextSibling)) || (n.NextSibling.Type == html.TextNode && !unicode.IsPunct(getFirstRune(n.NextSibling.Data))) { if _, err = fmt.Fprint(w, "\n"); err != nil { return