From 794c3b26acbd3931b7973ff7e09a42b0ac414b1c Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Mon, 16 Nov 2020 12:38:24 +0100 Subject: 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.--- attr/boolean_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'attr/boolean_test.go') diff --git a/attr/boolean_test.go b/attr/boolean_test.go index 4e6bb37..309b025 100644 --- a/attr/boolean_test.go +++ b/attr/boolean_test.go @@ -26,7 +26,7 @@ func TestBooleanAttributes(t *testing.T) { for name, fn := range cases { t.Run(fmt.Sprintf("should output %v", name), func(t *testing.T) { n := g.El("div", fn()) - assert.Equal(t, fmt.Sprintf(`
`, name), n) + assert.Equal(t, fmt.Sprintf(`
`, name), n) }) } } -- cgit 1.4.1