diff --git a/README.md b/README.md index 51b73df..e156bef 100644 --- a/README.md +++ b/README.md @@ -475,7 +475,7 @@ goldmark's Markdown processing is outlined in the diagram below. V +------- renderer.Renderer ------------------------ | 1. Traverse AST and apply renderer.NodeRenderer - | corespond to the node type + | correspond to the node type | V diff --git a/ast/ast.go b/ast/ast.go index 3719ebb..6ffc17a 100644 --- a/ast/ast.go +++ b/ast/ast.go @@ -93,7 +93,7 @@ type Node interface { // RemoveChildren removes all children from this node. RemoveChildren(self Node) - // SortChildren sorts childrens by comparator. + // SortChildren sorts children by comparator. SortChildren(comparator func(n1, n2 Node) int) // ReplaceChild replace a node v1 with a node insertee. @@ -118,7 +118,7 @@ type Node interface { // Dump dumps an AST tree structure to stdout. // This function completely aimed for debugging. - // level is a indent level. Implementer should indent informations with + // level is a indent level. Implementer should indent information with // 2 * level spaces. Dump(source []byte, level int) @@ -169,7 +169,7 @@ type Node interface { RemoveAttributes() } -// A BaseNode struct implements the Node interface partialliy. +// A BaseNode struct implements the Node interface partially. type BaseNode struct { firstChild Node lastChild Node diff --git a/extension/_test/typographer.txt b/extension/_test/typographer.txt index cf5fea6..899b355 100644 --- a/extension/_test/typographer.txt +++ b/extension/_test/typographer.txt @@ -58,7 +58,7 @@ reported "issue 1 (IE-only)", "issue 2", 'issue3 (FF-only)', 'issue4'

reported “issue 1 (IE-only)”, “issue 2”, ‘issue3 (FF-only)’, ‘issue4’

//= = = = = = = = = = = = = = = = = = = = = = = =// -8: handle inches in qoutes +8: handle inches in quotes //- - - - - - - - -// "Monitor 21"" and "Monitor"" //- - - - - - - - -// diff --git a/extension/footnote.go b/extension/footnote.go index 09b6fa8..87c017e 100644 --- a/extension/footnote.go +++ b/extension/footnote.go @@ -272,9 +272,9 @@ func (a *footnoteASTTransformer) Transform(node *gast.Document, reader text.Read // FootnoteConfig holds configuration values for the footnote extension. // // Link* and Backlink* configurations have some variables: -// Occurrances of “^^” in the string will be replaced by the +// Occurrences of “^^” in the string will be replaced by the // corresponding footnote number in the HTML output. -// Occurrances of “%%” will be replaced by a number for the +// Occurrences of “%%” will be replaced by a number for the // reference (footnotes can have multiple references). type FootnoteConfig struct { html.Config diff --git a/extension/linkify.go b/extension/linkify.go index 2f046eb..c0b882e 100644 --- a/extension/linkify.go +++ b/extension/linkify.go @@ -113,7 +113,7 @@ func WithLinkifyWWWRegexp(value *regexp.Regexp) LinkifyOption { } } -// WithLinkifyWWWRegexp is a functional otpion that specify +// WithLinkifyWWWRegexp is a functional option that specify // a pattern of the email address. type withLinkifyEmailRegexp struct { value *regexp.Regexp diff --git a/extension/typographer.go b/extension/typographer.go index f56c06f..fe420a1 100644 --- a/extension/typographer.go +++ b/extension/typographer.go @@ -113,7 +113,7 @@ func (o *withTypographicSubstitutions) SetTypographerOption(p *TypographerConfig p.Substitutions = o.value } -// WithTypographicSubstitutions is a functional otpion that specify replacement text +// WithTypographicSubstitutions is a functional option that specify replacement text // for punctuations. func WithTypographicSubstitutions(values map[TypographicPunctuation][]byte) TypographerOption { replacements := newDefaultSubstitutions() @@ -217,7 +217,7 @@ func (s *typographerParser) Parse(parent gast.Node, block text.Reader, pc parser counter := getUnclosedCounter(pc) if c == '\'' { if s.Substitutions[Apostrophe] != nil { - // Handle decade abbrevations such as '90s + // Handle decade abbreviations such as '90s if d.CanOpen && !d.CanClose && len(line) > 3 && util.IsNumeric(line[1]) && util.IsNumeric(line[2]) && line[3] == 's' { after := rune(' ') if len(line) > 4 {