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>
This commit is contained in:
cuishuang 2022-03-10 12:01:05 +08:00 committed by Anthony Fok
parent bbd455fe79
commit 48c98a8d24
5 changed files with 5 additions and 5 deletions

View file

@ -128,7 +128,7 @@ func LoadConfig(d ConfigSourceDescriptor, doWithConfig ...func(cfg config.Provid
// they are finalized. // they are finalized.
collectHook := func(m *modules.ModulesConfig) error { collectHook := func(m *modules.ModulesConfig) error {
// We don't need the merge strategy configuration anymore, // 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() l.deleteMergeStrategies()
if err := l.loadLanguageSettings(nil); err != nil { if err := l.loadLanguageSettings(nil); err != nil {

View file

@ -93,7 +93,7 @@ type HeadingRenderer interface {
// ElementPositionResolver provides a way to resolve the start Position // ElementPositionResolver provides a way to resolve the start Position
// of a markdown element in the original source document. // 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. // used for error logging.
type ElementPositionResolver interface { type ElementPositionResolver interface {
ResolvePosition(ctx any) text.Position ResolvePosition(ctx any) text.Position

View file

@ -8,7 +8,7 @@ import (
"github.com/yuin/goldmark/util" "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 // MIT License
// Copyright (c) 2019 Dmitry Sedykh // Copyright (c) 2019 Dmitry Sedykh

View file

@ -70,7 +70,7 @@ func (m PageMatcher) Matches(p Page) bool {
return true 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) { func DecodeCascade(in any) (map[PageMatcher]maps.Params, error) {
m, err := maps.ToSliceStringMap(in) m, err := maps.ToSliceStringMap(in)
if err != nil { if err != nil {

View file

@ -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 extensionHints == nil || extensionHints[0] == ".txt" {
if ext := path.Ext(filename); ext != "" { if ext := path.Ext(filename); ext != "" {
extensionHints = []string{ext} extensionHints = []string{ext}