diff options
author | Markus Wüstenberg | 2020-10-22 09:07:57 +0200 |
---|---|---|
committer | GitHub | 2020-10-22 09:07:57 +0200 |
commit | 6d2fb0eeb15d6b9774f127517d160137251264a4 (patch) | |
tree | d571a516f25e85dd4086521d73a419573d776df2 /el/section.go | |
parent | f2a2b949704e2faa7117dd33aae8da551a4baf8e (diff) | |
download | gomponents-6d2fb0eeb15d6b9774f127517d160137251264a4.tar.lz gomponents-6d2fb0eeb15d6b9774f127517d160137251264a4.tar.zst gomponents-6d2fb0eeb15d6b9774f127517d160137251264a4.zip |
Add Group function to group Nodes (#29)
Diffstat (limited to 'el/section.go')
-rw-r--r-- | el/section.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/el/section.go b/el/section.go index 3c31ebc..f49a39c 100644 --- a/el/section.go +++ b/el/section.go @@ -31,32 +31,32 @@ func Header(children ...g.Node) g.NodeFunc { // H1 returns an element with name "h1", the given text content, and the given children. func H1(text string, children ...g.Node) g.NodeFunc { - return g.El("h1", prepend(g.Text(text), children)...) + return g.El("h1", g.Text(text), g.Group(children)) } // H2 returns an element with name "h2", the given text content, and the given children. func H2(text string, children ...g.Node) g.NodeFunc { - return g.El("h2", prepend(g.Text(text), children)...) + return g.El("h2", g.Text(text), g.Group(children)) } // H3 returns an element with name "h3", the given text content, and the given children. func H3(text string, children ...g.Node) g.NodeFunc { - return g.El("h3", prepend(g.Text(text), children)...) + return g.El("h3", g.Text(text), g.Group(children)) } // H4 returns an element with name "h4", the given text content, and the given children. func H4(text string, children ...g.Node) g.NodeFunc { - return g.El("h4", prepend(g.Text(text), children)...) + return g.El("h4", g.Text(text), g.Group(children)) } // H5 returns an element with name "h5", the given text content, and the given children. func H5(text string, children ...g.Node) g.NodeFunc { - return g.El("h5", prepend(g.Text(text), children)...) + return g.El("h5", g.Text(text), g.Group(children)) } // H6 returns an element with name "h6", the given text content, and the given children. func H6(text string, children ...g.Node) g.NodeFunc { - return g.El("h6", prepend(g.Text(text), children)...) + return g.El("h6", g.Text(text), g.Group(children)) } // HGroup returns an element with name "hgroup" and the given children. |