all: Typo fixes

This commit is contained in:
Christian Oliff 2024-03-16 01:25:52 +09:00 committed by GitHub
parent 68d92ef9dd
commit 78178d0c2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 20 additions and 20 deletions

View file

@ -239,7 +239,7 @@ const (
// E.g. /blog/my-post.md // E.g. /blog/my-post.md
PathTypeContentSingle PathTypeContentSingle
// All bewlow are bundled content files. // All below are bundled content files.
// Leaf bundles, e.g. /blog/my-post/index.md // Leaf bundles, e.g. /blog/my-post/index.md
PathTypeLeaf PathTypeLeaf
@ -313,7 +313,7 @@ func (p *Path) norm(s string) string {
return s return s
} }
// IdentifierBase satifies identity.Identity. // IdentifierBase satisfies identity.Identity.
func (p *Path) IdentifierBase() string { func (p *Path) IdentifierBase() string {
return p.Base() return p.Base()
} }
@ -368,7 +368,7 @@ func (p *Path) Name() string {
return p.s 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 { func (p *Path) NameNoExt() string {
if i := p.identifierIndex(0); i != -1 { if i := p.identifierIndex(0); i != -1 {
return p.s[p.posContainerHigh : p.identifiers[i].Low-1] return p.s[p.posContainerHigh : p.identifiers[i].Low-1]
@ -376,7 +376,7 @@ func (p *Path) NameNoExt() string {
return p.s[p.posContainerHigh:] 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 { func (p *Path) NameNoLang() string {
i := p.identifierIndex(p.posIdentifierLanguage) i := p.identifierIndex(p.posIdentifierLanguage)
if i == -1 { if i == -1 {
@ -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:] 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". // For bundles this will be the containing directory's name, e.g. "blog".
func (p *Path) BaseNameNoIdentifier() string { func (p *Path) BaseNameNoIdentifier() string {
if p.IsBundle() { if p.IsBundle() {
@ -395,7 +395,7 @@ func (p *Path) BaseNameNoIdentifier() string {
return p.NameNoIdentifier() 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 { func (p *Path) NameNoIdentifier() string {
if len(p.identifiers) > 0 { if len(p.identifiers) > 0 {
return p.s[p.posContainerHigh : p.identifiers[len(p.identifiers)-1].Low-1] return p.s[p.posContainerHigh : p.identifiers[len(p.identifiers)-1].Low-1]

View file

@ -2,7 +2,7 @@
For a given taxonomy, renders a list of terms assigned to the page. For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current 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" .) }} @example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}} */}}

2
deps/deps.go vendored
View file

@ -361,7 +361,7 @@ type BuildState struct {
mu sync.Mutex // protects state below. 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. // contains a post-processing prefix.
filenamesWithPostPrefix map[string]bool filenamesWithPostPrefix map[string]bool
} }

View file

@ -42,7 +42,7 @@ var LanguageDirsMerger overlayfs.DirsMerger = func(lofi, bofi []fs.DirEntry) []f
// AppendDirsMerger merges two directories keeping all regular files // AppendDirsMerger merges two directories keeping all regular files
// with the first slice as the base. // 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. // 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 { var AppendDirsMerger overlayfs.DirsMerger = func(lofi, bofi []fs.DirEntry) []fs.DirEntry {
for _, fi1 := range bofi { for _, fi1 := range bofi {

View file

@ -822,7 +822,7 @@ func (f *rootMappingDir) ReadDir(count int) ([]iofs.DirEntry, error) {
return f.fs.collectDirEntries(f.name) 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") var errIsDir = errors.New("isDir")
func (f *rootMappingDir) Stat() (iofs.FileInfo, error) { func (f *rootMappingDir) Stat() (iofs.FileInfo, error) {

View file

@ -355,7 +355,7 @@ func (im *identityManager) String() string {
} }
func (im *identityManager) forEeachIdentity(fn func(id Identity) bool) bool { 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. // in a single-threaded context.
for id := range im.ids { for id := range im.ids {
if fn(id) { if fn(id) {

View file

@ -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()) 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) { "append": func(ts *testscript.TestScript, neg bool, args []string) {
if len(args) < 2 { if len(args) < 2 {
ts.Fatalf("usage: append FILE TEXT") ts.Fatalf("usage: append FILE TEXT")

View file

@ -147,7 +147,7 @@ type codeBlockContext struct {
ordinal int ordinal int
// This is only used in error situations and is expensive to create, // 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 pos htext.Position
posInit sync.Once posInit sync.Once
createPos func() htext.Position createPos func() htext.Position

View file

@ -95,7 +95,7 @@ func New(astAttributes []ast.Attribute, ownerType AttributesOwnerType) *Attribut
case []byte: case []byte:
// Note that we don't do any HTML escaping here. // Note that we don't do any HTML escaping here.
// We used to do that, but that changed in #9558. // 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) vv = string(vvv)
default: default:
panic(fmt.Sprintf("not implemented: %T", vvv)) panic(fmt.Sprintf("not implemented: %T", vvv))
@ -175,7 +175,7 @@ func (a *AttributesHolder) OptionsSlice() []Attribute {
// RenderASTAttributes writes the AST attributes to the given as attributes to an HTML element. // 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 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) { func RenderASTAttributes(w hugio.FlexiWriter, attributes ...ast.Attribute) {
for _, attr := range attributes { for _, attr := range attributes {

View file

@ -270,7 +270,7 @@ type Config struct {
// When enabled, we will pick the vendored module closest to the module // When enabled, we will pick the vendored module closest to the module
// using it. // 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, // Note that there can still be only one dependency of a given module path,
// so once it is in use it cannot be redefined. // so once it is in use it cannot be redefined.
VendorClosest bool VendorClosest bool

View file

@ -29,7 +29,7 @@ import (
const commitPrefix = "releaser:" const commitPrefix = "releaser:"
// New initialises a ReleaseHandler. // New initializes a ReleaseHandler.
func New(skipPush, try bool, step int) (*ReleaseHandler, error) { func New(skipPush, try bool, step int) (*ReleaseHandler, error) {
if step < 1 || step > 2 { if step < 1 || step > 2 {
return nil, fmt.Errorf("step must be 1 or 2") return nil, fmt.Errorf("step must be 1 or 2")

View file

@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // 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. // SCSS/SASS.
package dartsass package dartsass

View file

@ -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 return "", nil
} }