From 6d2fb0eeb15d6b9774f127517d160137251264a4 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 22 Oct 2020 09:07:57 +0200 Subject: Add Group function to group Nodes (#29) --- el/inline.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'el/inline.go') diff --git a/el/inline.go b/el/inline.go index f9ae39f..e0530d3 100644 --- a/el/inline.go +++ b/el/inline.go @@ -9,21 +9,21 @@ func Span(children ...g.Node) g.NodeFunc { } func A(href string, children ...g.Node) g.NodeFunc { - return g.El("a", prepend(g.Attr("href", href), children)...) + return g.El("a", g.Attr("href", href), g.Group(children)) } func B(text string, children ...g.Node) g.NodeFunc { - return g.El("b", prepend(g.Text(text), children)...) + return g.El("b", g.Text(text), g.Group(children)) } func Strong(text string, children ...g.Node) g.NodeFunc { - return g.El("strong", prepend(g.Text(text), children)...) + return g.El("strong", g.Text(text), g.Group(children)) } func I(text string, children ...g.Node) g.NodeFunc { - return g.El("i", prepend(g.Text(text), children)...) + return g.El("i", g.Text(text), g.Group(children)) } func Em(text string, children ...g.Node) g.NodeFunc { - return g.El("em", prepend(g.Text(text), children)...) + return g.El("em", g.Text(text), g.Group(children)) } -- cgit 1.4.1