From 45c00b7c162b55ca9bcdd9a664bcf1294aa5d266 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 29 May 2026 07:45:08 -0700 Subject: [PATCH] misc: Remove duplicate words in comments Closes #14936 Closes #14950 Closes #14965 --- common/hiter/iter.go | 2 +- config/allconfig/docshelper.go | 2 +- helpers/docshelper.go | 2 +- output/docshelper.go | 2 +- parser/pageparser/pagelexer_shortcode.go | 2 +- related/inverted_index.go | 2 +- resources/page/pagemeta/page_frontmatter.go | 4 ++-- transform/chain.go | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/hiter/iter.go b/common/hiter/iter.go index dd2a41835..1ab19a0b8 100644 --- a/common/hiter/iter.go +++ b/common/hiter/iter.go @@ -1,7 +1,7 @@ package hiter // Common iterator functions. -// Some of these are are based on this discsussion: https://github.com/golang/go/issues/61898 +// Some of these are based on this discsussion: https://github.com/golang/go/issues/61898 import "iter" diff --git a/config/allconfig/docshelper.go b/config/allconfig/docshelper.go index deaf4b9e0..f45f4de17 100644 --- a/config/allconfig/docshelper.go +++ b/config/allconfig/docshelper.go @@ -19,7 +19,7 @@ import ( "github.com/gohugoio/hugo/docshelper" ) -// This is is just some helpers used to create some JSON used in the Hugo docs. +// This is just a helper used to create some JSON used in the Hugo docs. func init() { docsProvider := func() docshelper.DocProvider { cfg := config.New() diff --git a/helpers/docshelper.go b/helpers/docshelper.go index 5edbef118..168f8995d 100644 --- a/helpers/docshelper.go +++ b/helpers/docshelper.go @@ -8,7 +8,7 @@ import ( "github.com/gohugoio/hugo/docshelper" ) -// This is is just some helpers used to create some JSON used in the Hugo docs. +// This is just a helper used to create some JSON used in the Hugo docs. func init() { docsProvider := func() docshelper.DocProvider { var chromaLexers []any diff --git a/output/docshelper.go b/output/docshelper.go index 387c011ad..7f441a69e 100644 --- a/output/docshelper.go +++ b/output/docshelper.go @@ -7,7 +7,7 @@ import ( "github.com/gohugoio/hugo/docshelper" ) -// This is is just some helpers used to create some JSON used in the Hugo docs. +// This is just a helper used to create some JSON used in the Hugo docs. func init() { docsProvider := func() docshelper.DocProvider { return docshelper.DocProvider{ diff --git a/parser/pageparser/pagelexer_shortcode.go b/parser/pageparser/pagelexer_shortcode.go index 5d3c55eeb..eb1b0bf73 100644 --- a/parser/pageparser/pagelexer_shortcode.go +++ b/parser/pageparser/pagelexer_shortcode.go @@ -33,7 +33,7 @@ var ( rightDelimScNoMarkup = []byte(">}}") leftDelimScWithMarkup = []byte("{{%") rightDelimScWithMarkup = []byte("%}}") - leftComment = []byte("/*") // comments in this context us used to to mark shortcodes as "not really a shortcode" + leftComment = []byte("/*") // comments in this context are used to mark shortcodes as "not really a shortcode" rightComment = []byte("*/") ) diff --git a/related/inverted_index.go b/related/inverted_index.go index 9541ecd8a..c6c65d97f 100644 --- a/related/inverted_index.go +++ b/related/inverted_index.go @@ -331,7 +331,7 @@ type SearchOpts struct { // The indices to search in. Indices []string - // Fragments holds a a list of special keywords that is used + // Fragments holds a list of special keywords that is used // for indices configured as type "fragments". // This will match the fragment identifiers of the documents. Fragments []string diff --git a/resources/page/pagemeta/page_frontmatter.go b/resources/page/pagemeta/page_frontmatter.go index 53788d9b3..d2f3d2793 100644 --- a/resources/page/pagemeta/page_frontmatter.go +++ b/resources/page/pagemeta/page_frontmatter.go @@ -395,7 +395,7 @@ func (p *PageConfigEarly) CompileForPagesFromDataPre(basePath string, logger log // Note that NormalizePathStringBasic will make sure that we don't preserve the unnormalized path. // We do that when we create pages from the file system; mostly for backward compatibility, - // but also because people tend to use use the filename to name their resources (with spaces and all), + // but also because people tend to use the filename to name their resources (with spaces and all), // and this isn't relevant when creating resources from an API where it's easy to add textual meta data. p.Path = paths.NormalizePathStringBasic(p.Path) @@ -499,7 +499,7 @@ func (rc *ResourceConfig) Compile(basePath string, fim hugofs.FileMetaInfo, conf // Note that NormalizePathStringBasic will make sure that we don't preserve the unnormalized path. // We do that when we create resources from the file system; mostly for backward compatibility, - // but also because people tend to use use the filename to name their resources (with spaces and all), + // but also because people tend to use the filename to name their resources (with spaces and all), // and this isn't relevant when creating resources from an API where it's easy to add textual meta data. rc.Path = paths.NormalizePathStringBasic(path.Join(basePath, rc.Path)) rc.PathInfo = conf.PathParser().Parse(files.ComponentFolderContent, rc.Path) diff --git a/transform/chain.go b/transform/chain.go index d4e7b6223..49f0b7a8e 100644 --- a/transform/chain.go +++ b/transform/chain.go @@ -58,7 +58,7 @@ func NewEmpty() Chain { } // Implements contentTransformer -// Content is read from the from-buffer and rewritten to to the to-buffer. +// Content is read from the from-buffer and rewritten to the to-buffer. type fromToBuffer struct { from *bytes.Buffer to *bytes.Buffer