From 610cedaa61cf1f318ecd4a7818a896b1e56e7662 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Thu, 18 May 2023 12:05:56 +0300 Subject: all: Fix comments for exported functions and packages --- markup/asciidocext/asciidocext_config/config.go | 2 +- markup/converter/hooks/hooks.go | 2 +- markup/goldmark/codeblocks/transform.go | 2 +- markup/goldmark/goldmark_config/config.go | 2 +- markup/highlight/highlight.go | 2 +- markup/internal/attributes/attributes.go | 2 +- markup/tableofcontents/tableofcontents.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'markup') diff --git a/markup/asciidocext/asciidocext_config/config.go b/markup/asciidocext/asciidocext_config/config.go index 1409b2783..4c38fbbbf 100644 --- a/markup/asciidocext/asciidocext_config/config.go +++ b/markup/asciidocext/asciidocext_config/config.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package asciidoc_config holds asciidoc related configuration. +// Package asciidocext_config holds asciidoc related configuration. package asciidocext_config var ( diff --git a/markup/converter/hooks/hooks.go b/markup/converter/hooks/hooks.go index 5c7b9692d..c5be4d1f0 100644 --- a/markup/converter/hooks/hooks.go +++ b/markup/converter/hooks/hooks.go @@ -121,7 +121,7 @@ type HeadingContext interface { // HeadingRenderer describes a uniquely identifiable rendering hook. type HeadingRenderer interface { - // Render writes the rendered content to w using the data in w. + // RenderHeading writes the rendered content to w using the data in w. RenderHeading(cctx context.Context, w io.Writer, ctx HeadingContext) error identity.Provider } diff --git a/markup/goldmark/codeblocks/transform.go b/markup/goldmark/codeblocks/transform.go index be5334b5f..829dfcc19 100644 --- a/markup/goldmark/codeblocks/transform.go +++ b/markup/goldmark/codeblocks/transform.go @@ -6,7 +6,7 @@ import ( "github.com/yuin/goldmark/text" ) -// Kind is the kind of an Hugo code block. +// KindCodeBlock is the kind of an Hugo code block. var KindCodeBlock = ast.NewNodeKind("HugoCodeBlock") // Its raw contents are the plain text of the code block. diff --git a/markup/goldmark/goldmark_config/config.go b/markup/goldmark/goldmark_config/config.go index f35427ac1..a6fe0e624 100644 --- a/markup/goldmark/goldmark_config/config.go +++ b/markup/goldmark/goldmark_config/config.go @@ -20,7 +20,7 @@ const ( AutoHeadingIDTypeBlackfriday = "blackfriday" ) -// DefaultConfig holds the default Goldmark configuration. +// Default holds the default Goldmark configuration. var Default = Config{ Extensions: Extensions{ Typographer: Typographer{ diff --git a/markup/highlight/highlight.go b/markup/highlight/highlight.go index cb0d578de..e2a4ccdb9 100644 --- a/markup/highlight/highlight.go +++ b/markup/highlight/highlight.go @@ -148,7 +148,7 @@ func (h chromaHighlighter) IsDefaultCodeBlockRenderer() bool { var id = identity.NewPathIdentity("chroma", "highlight") -// GetIdentify is for internal use. +// GetIdentity is for internal use. func (h chromaHighlighter) GetIdentity() identity.Identity { return id } diff --git a/markup/internal/attributes/attributes.go b/markup/internal/attributes/attributes.go index 09bba5c41..d2c8a860f 100644 --- a/markup/internal/attributes/attributes.go +++ b/markup/internal/attributes/attributes.go @@ -199,7 +199,7 @@ func RenderASTAttributes(w hugio.FlexiWriter, attributes ...ast.Attribute) { } } -// Render writes the attributes to the given as attributes to an HTML element. +// RenderAttributes Render writes the attributes to the given as attributes to an HTML element. // This is used for the default codeblock rendering. // This performs HTML escaping of string attributes. func RenderAttributes(w hugio.FlexiWriter, skipClass bool, attributes ...Attribute) { diff --git a/markup/tableofcontents/tableofcontents.go b/markup/tableofcontents/tableofcontents.go index 774b5c6cd..5afb36067 100644 --- a/markup/tableofcontents/tableofcontents.go +++ b/markup/tableofcontents/tableofcontents.go @@ -31,7 +31,7 @@ type Builder struct { toc *Fragments } -// Add adds the heading to the ToC. +// AddAt adds the heading to the ToC. func (b *Builder) AddAt(h *Heading, row, level int) { if b.toc == nil { b.toc = &Fragments{} -- cgit v1.2.3