Skip to content

Commit

Permalink
Fix links in package documentation
Browse files Browse the repository at this point in the history
Apparently, [Node]s doesn't link in Godoc, while [Node]-s does.
  • Loading branch information
markuswustenberg committed Sep 24, 2024
1 parent 04640fc commit 3fa5e67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gomponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// All DOM elements and attributes can be created by using the [El] and [Attr] functions.
// The functions [Text], [Textf], [Raw], and [Rawf] can be used to create text nodes, either HTML-escaped or unescaped.
// See also helper functions [Map], [If], and [Iff] for mapping data to nodes and inserting them conditionally.
// There's also the [Group] type, which is a slice of [Node]s that can be rendered as one [Node].
// There's also the [Group] type, which is a slice of [Node]-s that can be rendered as one [Node].
//
// For basic HTML elements and attributes, see the package html.
//
Expand Down Expand Up @@ -247,7 +247,7 @@ func Rawf(format string, a ...interface{}) Node {
})
}

// Map a slice of anything to a [Group] (which is just a slice of [Node]s).
// Map a slice of anything to a [Group] (which is just a slice of [Node]-s).
func Map[T any](ts []T, cb func(T) Node) Group {
var nodes []Node
for _, t := range ts {
Expand All @@ -256,7 +256,7 @@ func Map[T any](ts []T, cb func(T) Node) Group {
return nodes
}

// Group a slice of [Node]s into one Node, while still being usable like a regular slice of [Node]s.
// Group a slice of [Node]-s into one Node, while still being usable like a regular slice of [Node]-s.
// A [Group] can render directly, but if any of the direct children are [AttributeType], they will be ignored,
// to not produce invalid HTML.
type Group []Node
Expand Down

0 comments on commit 3fa5e67

Please sign in to comment.