summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcuishuang <imcusg@gmail.com>2022-03-10 12:01:05 +0800
committerAnthony Fok <anthony.fok@canada.ca>2022-03-22 00:38:23 -0600
commit48c98a8d24a0f5ceb17ce4977587f660d137a1a5 (patch)
treec38e62b143227b3528194e85577332f0ae8591be
parentbbd455fe79de4d882c103f4352945f60276e564e (diff)
Fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com> [foka@debian.org: Resolve merge conflict and squash 2 commits] Signed-off-by: Anthony Fok <foka@debian.org>
-rw-r--r--hugolib/config.go2
-rw-r--r--markup/converter/hooks/hooks.go2
-rw-r--r--markup/goldmark/internal/extensions/attributes/attributes.go2
-rw-r--r--resources/page/page_matcher.go2
-rw-r--r--resources/resource_factories/create/remote.go2
5 files changed, 5 insertions, 5 deletions
diff --git a/hugolib/config.go b/hugolib/config.go
index dffecd9a3..b2479cbfe 100644
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -128,7 +128,7 @@ func LoadConfig(d ConfigSourceDescriptor, doWithConfig ...func(cfg config.Provid
// they are finalized.
collectHook := func(m *modules.ModulesConfig) error {
// We don't need the merge strategy configuration anymore,
- // remove it so it doesn't accidentaly show up in other settings.
+ // remove it so it doesn't accidentally show up in other settings.
l.deleteMergeStrategies()
if err := l.loadLanguageSettings(nil); err != nil {
diff --git a/markup/converter/hooks/hooks.go b/markup/converter/hooks/hooks.go
index dc5da5a30..a8666bdf0 100644
--- a/markup/converter/hooks/hooks.go
+++ b/markup/converter/hooks/hooks.go
@@ -93,7 +93,7 @@ type HeadingRenderer interface {
// ElementPositionResolver provides a way to resolve the start Position
// of a markdown element in the original source document.
-// This may be both slow and aproximate, so should only be
+// This may be both slow and approximate, so should only be
// used for error logging.
type ElementPositionResolver interface {
ResolvePosition(ctx any) text.Position
diff --git a/markup/goldmark/internal/extensions/attributes/attributes.go b/markup/goldmark/internal/extensions/attributes/attributes.go
index e10e7ba79..22c717b94 100644
--- a/markup/goldmark/internal/extensions/attributes/attributes.go
+++ b/markup/goldmark/internal/extensions/attributes/attributes.go
@@ -8,7 +8,7 @@ import (
"github.com/yuin/goldmark/util"
)
-// This extenion is based on/inspired by https://github.com/mdigger/goldmark-attributes
+// This extension is based on/inspired by https://github.com/mdigger/goldmark-attributes
// MIT License
// Copyright (c) 2019 Dmitry Sedykh
diff --git a/resources/page/page_matcher.go b/resources/page/page_matcher.go
index dc23b13bb..15b8ede89 100644
--- a/resources/page/page_matcher.go
+++ b/resources/page/page_matcher.go
@@ -70,7 +70,7 @@ func (m PageMatcher) Matches(p Page) bool {
return true
}
-// DecodeCascade decodes in which could be eiter a map or a slice of maps.
+// DecodeCascade decodes in which could be either a map or a slice of maps.
func DecodeCascade(in any) (map[PageMatcher]maps.Params, error) {
m, err := maps.ToSliceStringMap(in)
if err != nil {
diff --git a/resources/resource_factories/create/remote.go b/resources/resource_factories/create/remote.go
index 0ca2be834..0beb87195 100644
--- a/resources/resource_factories/create/remote.go
+++ b/resources/resource_factories/create/remote.go
@@ -125,7 +125,7 @@ func (c *Client) FromRemote(uri string, optionsm map[string]any) (resource.Resou
}
}
- // Look for a file extention. If it's .txt, look for a more specific.
+ // Look for a file extension. If it's .txt, look for a more specific.
if extensionHints == nil || extensionHints[0] == ".txt" {
if ext := path.Ext(filename); ext != "" {
extensionHints = []string{ext}