Render correct HTML5 (#44) Previously, elements of kind void and empty elements generally would be rendered auto-closing (with a final `/` character in the start tag), which is allowed sometimes but arguably wrong. See https://dev.w3.org/html5/spec-LC/syntax.html#end-tags This created problems with for example `textarea` and `script`, which cannot be auto-closing, or the browser renders it wrong. Also clarified in the docs that this library outputs HTML5. Fixes #42.
1 file changed, 1 insertion(+), 1 deletion(-)
changed files
M attr/simple_test.go → attr/simple_test.go
@@ -43,7 +43,7 @@ for name, fn := range cases { t.Run(fmt.Sprintf(`should output %v="hat"`, name), func(t *testing.T) { n := g.El("div", fn("hat")) - assert.Equal(t, fmt.Sprintf(`<div %v="hat" />`, name), n) + assert.Equal(t, fmt.Sprintf(`<div %v="hat"></div>`, name), n) }) } }