From a58043d58789f95046a567d2ad1bde55e352d5f0 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 3 Oct 2024 10:55:52 +0200 Subject: Remove SVG package (#214) Because the added value of having this was very small, and I don't want to confuse people about what's properly supported, I've removed the SVG package. As #196 showed, there can easily be conflicts between HTML and SVG, and the rendering isn't really set up for anything else than HTML. It's still easy to create SVG elements: `html.SVG` exists in this repo, and the rest is often just a string that can be included using `g.Raw`. Fixes #206--- svg/elements_test.go | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 svg/elements_test.go (limited to 'svg/elements_test.go') diff --git a/svg/elements_test.go b/svg/elements_test.go deleted file mode 100644 index f1ed47c..0000000 --- a/svg/elements_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package svg_test - -import ( - "fmt" - "testing" - - g "github.com/maragudk/gomponents" - "github.com/maragudk/gomponents/internal/assert" - . "github.com/maragudk/gomponents/svg" -) - -func TestSimpleElements(t *testing.T) { - cases := map[string]func(...g.Node) g.Node{ - "path": Path, - } - - for name, fn := range cases { - t.Run(fmt.Sprintf("should output %v", name), func(t *testing.T) { - n := fn(g.Attr("id", "hat")) - assert.Equal(t, fmt.Sprintf(`<%v id="hat">`, name, name), n) - }) - } -} - -func TestSVG(t *testing.T) { - t.Run("outputs svg element with xml namespace attribute", func(t *testing.T) { - assert.Equal(t, ``, SVG(g.El("path"))) - }) -} -- cgit 1.4.1