Skip to content

Commit

Permalink
all: Typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
coliff committed Mar 15, 2024
1 parent 68d92ef commit 78178d0
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions common/paths/pathparser.go
Expand Up @@ -239,7 +239,7 @@ const (
// E.g. /blog/my-post.md
PathTypeContentSingle

// All bewlow are bundled content files.
// All below are bundled content files.

// Leaf bundles, e.g. /blog/my-post/index.md
PathTypeLeaf
Expand Down Expand Up @@ -313,7 +313,7 @@ func (p *Path) norm(s string) string {
return s
}

// IdentifierBase satifies identity.Identity.
// IdentifierBase satisfies identity.Identity.
func (p *Path) IdentifierBase() string {
return p.Base()
}
Expand Down Expand Up @@ -368,15 +368,15 @@ func (p *Path) Name() string {
return p.s
}

// Name returns the last element of path withhout any extension.
// Name returns the last element of path without any extension.
func (p *Path) NameNoExt() string {
if i := p.identifierIndex(0); i != -1 {
return p.s[p.posContainerHigh : p.identifiers[i].Low-1]
}
return p.s[p.posContainerHigh:]
}

// Name returns the last element of path withhout any language identifier.
// Name returns the last element of path without any language identifier.
func (p *Path) NameNoLang() string {
i := p.identifierIndex(p.posIdentifierLanguage)
if i == -1 {
Expand All @@ -386,7 +386,7 @@ func (p *Path) NameNoLang() string {
return p.s[p.posContainerHigh:p.identifiers[i].Low-1] + p.s[p.identifiers[i].High:]
}

// BaseNameNoIdentifier returns the logcical base name for a resource without any idenifier (e.g. no extension).
// BaseNameNoIdentifier returns the logical base name for a resource without any identifier (e.g. no extension).
// For bundles this will be the containing directory's name, e.g. "blog".
func (p *Path) BaseNameNoIdentifier() string {
if p.IsBundle() {
Expand All @@ -395,7 +395,7 @@ func (p *Path) BaseNameNoIdentifier() string {
return p.NameNoIdentifier()
}

// NameNoIdentifier returns the last element of path withhout any identifier (e.g. no extension).
// NameNoIdentifier returns the last element of path without any identifier (e.g. no extension).
func (p *Path) NameNoIdentifier() string {
if len(p.identifiers) > 0 {
return p.s[p.posContainerHigh : p.identifiers[len(p.identifiers)-1].Low-1]
Expand Down Expand Up @@ -435,7 +435,7 @@ func (p *Path) PathNoIdentifier() string {
return p.base(false, false)
}

// PathRel returns the path relativeto the given owner.
// PathRel returns the path relative to the given owner.
func (p *Path) PathRel(owner *Path) string {
ob := owner.Base()
if !strings.HasSuffix(ob, "/") {
Expand Down
2 changes: 1 addition & 1 deletion create/skeletons/theme/layouts/partials/terms.html
Expand Up @@ -2,7 +2,7 @@
For a given taxonomy, renders a list of terms assigned to the page.

@context {page} page The current page.
@context {string} taxonomy The taxonony.
@context {string} taxonomy The taxonomy.

@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
Expand Down
2 changes: 1 addition & 1 deletion deps/deps.go
Expand Up @@ -361,7 +361,7 @@ type BuildState struct {

mu sync.Mutex // protects state below.

// A set of ilenames in /public that
// A set of filenames in /public that
// contains a post-processing prefix.
filenamesWithPostPrefix map[string]bool
}
Expand Down
2 changes: 1 addition & 1 deletion hugofs/dirsmerger.go
Expand Up @@ -42,7 +42,7 @@ var LanguageDirsMerger overlayfs.DirsMerger = func(lofi, bofi []fs.DirEntry) []f

// AppendDirsMerger merges two directories keeping all regular files
// with the first slice as the base.
// Duplicate directories in the secnond slice will be ignored.
// Duplicate directories in the second slice will be ignored.
// This strategy is used for the i18n and data fs where we need all entries.
var AppendDirsMerger overlayfs.DirsMerger = func(lofi, bofi []fs.DirEntry) []fs.DirEntry {
for _, fi1 := range bofi {
Expand Down
2 changes: 1 addition & 1 deletion hugofs/rootmapping_fs.go
Expand Up @@ -822,7 +822,7 @@ func (f *rootMappingDir) ReadDir(count int) ([]iofs.DirEntry, error) {
return f.fs.collectDirEntries(f.name)
}

// Sentinal error to signal that a file is a directory.
// Sentinel error to signal that a file is a directory.
var errIsDir = errors.New("isDir")

func (f *rootMappingDir) Stat() (iofs.FileInfo, error) {
Expand Down
2 changes: 1 addition & 1 deletion identity/identity.go
Expand Up @@ -355,7 +355,7 @@ func (im *identityManager) String() string {
}

func (im *identityManager) forEeachIdentity(fn func(id Identity) bool) bool {
// The absense of a lock here is debliberate. This is currently opnly used on server reloads
// The absence of a lock here is deliberate. This is currently only used on server reloads
// in a single-threaded context.
for id := range im.ids {
if fn(id) {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Expand Up @@ -134,7 +134,7 @@ var commonTestScriptsParam = testscript.Params{
fmt.Fprintf(ts.Stdout(), "%s %04o %s %s\n", fi.Mode(), fi.Mode().Perm(), fi.ModTime().Format(time.RFC3339Nano), fi.Name())
}
},
// append appends to a file with a leaading newline.
// append appends to a file with a leading newline.
"append": func(ts *testscript.TestScript, neg bool, args []string) {
if len(args) < 2 {
ts.Fatalf("usage: append FILE TEXT")
Expand Down
2 changes: 1 addition & 1 deletion markup/goldmark/codeblocks/render.go
Expand Up @@ -147,7 +147,7 @@ type codeBlockContext struct {
ordinal int

// This is only used in error situations and is expensive to create,
// to deleay creation until needed.
// to delay creation until needed.
pos htext.Position
posInit sync.Once
createPos func() htext.Position
Expand Down
4 changes: 2 additions & 2 deletions markup/internal/attributes/attributes.go
Expand Up @@ -95,7 +95,7 @@ func New(astAttributes []ast.Attribute, ownerType AttributesOwnerType) *Attribut
case []byte:
// Note that we don't do any HTML escaping here.
// We used to do that, but that changed in #9558.
// Noww it's up to the templates to decide.
// Now it's up to the templates to decide.
vv = string(vvv)
default:
panic(fmt.Sprintf("not implemented: %T", vvv))
Expand Down Expand Up @@ -175,7 +175,7 @@ func (a *AttributesHolder) OptionsSlice() []Attribute {

// RenderASTAttributes writes the AST attributes to the given as attributes to an HTML element.
// This is used by the default HTML renderers, e.g. for headings etc. where no hook template could be found.
// This performs HTML esacaping of string attributes.
// This performs HTML escaping of string attributes.
func RenderASTAttributes(w hugio.FlexiWriter, attributes ...ast.Attribute) {
for _, attr := range attributes {

Expand Down
2 changes: 1 addition & 1 deletion modules/config.go
Expand Up @@ -270,7 +270,7 @@ type Config struct {

// When enabled, we will pick the vendored module closest to the module
// using it.
// The default behaviour is to pick the first.
// The default behavior is to pick the first.
// Note that there can still be only one dependency of a given module path,
// so once it is in use it cannot be redefined.
VendorClosest bool
Expand Down
2 changes: 1 addition & 1 deletion releaser/releaser.go
Expand Up @@ -29,7 +29,7 @@ import (

const commitPrefix = "releaser:"

// New initialises a ReleaseHandler.
// New initializes a ReleaseHandler.
func New(skipPush, try bool, step int) (*ReleaseHandler, error) {
if step < 1 || step > 2 {
return nil, fmt.Errorf("step must be 1 or 2")
Expand Down
2 changes: 1 addition & 1 deletion resources/resource_transformers/tocss/dartsass/client.go
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package dartsass integrates with the Dass Sass Embedded protocol to transpile
// Package dartsass integrates with the Dart Sass Embedded protocol to transpile
// SCSS/SASS.
package dartsass

Expand Down
Expand Up @@ -181,7 +181,7 @@ func (t importResolver) CanonicalizeURL(url string) (string, error) {
}
}

// Not found, let Dart Dass handle it
// Not found, let Dart Sass handle it
return "", nil
}

Expand Down

0 comments on commit 78178d0

Please sign in to comment.