ref: f7f549e3a7492c787c6abb4900cc0f57c8ab1826
parent: 6512d128c6d33b86f376764ab1d622a89ea18d20
author: XhmikosR <[email protected]>
date: Wed Jul 31 11:36:36 EDT 2019
Fix assorted typos
--- a/hugofs/stacktracer_fs.go
+++ b/hugofs/stacktracer_fs.go
@@ -24,7 +24,7 @@
"github.com/spf13/afero"
)
-// Make sure we don't accidently use this in the real Hugo.
+// Make sure we don't accidentally use this in the real Hugo.
var _ types.DevMarker = (*stacktracerFs)(nil)
// NewStacktracerFs wraps the given fs printing stack traces for file creates
--- a/hugolib/page__content.go
+++ b/hugolib/page__content.go
@@ -70,7 +70,7 @@
}
default:
- panic(fmt.Sprintf("unkown item type %T", it))
+ panic(fmt.Sprintf("unknown item type %T", it))
}
}
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -560,7 +560,7 @@
assertFunc := func(t *testing.T, ext string, pages page.Pages) {
p := pages[0]
checkPageTitle(t, p, "SimpleWithoutSummaryDelimiter")
- // Source is not Asciidoctor- or RST-compatibile so don't test them
+ // Source is not Asciidoctor- or RST-compatible so don't test them
if ext != "ad" && ext != "rst" {
checkPageContent(t, p, normalizeExpected(ext, "<p><a href=\"https://lipsum.com/\">Lorem ipsum</a> dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n\n<p>Additional text.</p>\n\n<p>Further text.</p>\n"), ext)
checkPageSummary(t, p, normalizeExpected(ext, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Additional text."), ext)
@@ -590,7 +590,7 @@
p := pages[0]
checkPageTitle(t, p, "SimpleWithSummaryParameter")
checkPageContent(t, p, normalizeExpected(ext, "<p>Some text.</p>\n\n<p>Some more text.</p>\n"), ext)
- // Summary is not Asciidoctor- or RST-compatibile so don't test them
+ // Summary is not Asciidoctor- or RST-compatible so don't test them
if ext != "ad" && ext != "rst" {
checkPageSummary(t, p, normalizeExpected(ext, "Page with summary parameter and <a href=\"http://www.example.com/\">a link</a>"), ext)
}
--- a/modules/module.go
+++ b/modules/module.go
@@ -12,7 +12,7 @@
// limitations under the License.
// Package modules provides a client that can be used to manage Hugo Components,
-// what's refered to as Hugo Modules. Hugo Modules is built on top of Go Modules,
+// what's referred to as Hugo Modules. Hugo Modules is built on top of Go Modules,
// but also supports vendoring and components stored directly in the themes dir.
package modules
--- a/resources/page/page.go
+++ b/resources/page/page.go
@@ -219,7 +219,7 @@
ChildCareProvider
TreeProvider
- // Horisontal navigation
+ // Horizontal navigation
InSectionPositioner
PageRenderProvider
PaginatorProvider
--- a/resources/resource.go
+++ b/resources/resource.go
@@ -702,7 +702,7 @@
mediaType media.Type) *genericResource {
if osFileInfo != nil && osFileInfo.IsDir() {
- panic(fmt.Sprintf("dirs nto supported resource types: %v", osFileInfo))
+ panic(fmt.Sprintf("dirs not supported resource types: %v", osFileInfo))
}
// This value is used both to construct URLs and file paths, but start
--- a/tpl/collections/merge_test.go
+++ b/tpl/collections/merge_test.go
@@ -61,7 +61,7 @@
// Error cases.
{"dst not a map", "not a map", nil, nil, true},
{"src not a map", simpleMap, "not a map", nil, true},
- {"diferent map typs", simpleMap, map[int]interface{}{32: "a"}, nil, true},
+ {"different map types", simpleMap, map[int]interface{}{32: "a"}, nil, true},
{"all nil", nil, nil, nil, true},
} {
--- a/tpl/tplimpl/shortcodes.go
+++ b/tpl/tplimpl/shortcodes.go
@@ -83,7 +83,7 @@
return bestMatch, true
}
-// calculate a weight for two string slices of same lenght.
+// calculate a weight for two string slices of same length.
// higher value means "better match".
func (s *shortcodeTemplates) compareVariants(a, b []string) int {