From 612d58f2c42864cc2d3e7b2081f2755f18b4124a Mon Sep 17 00:00:00 2001 From: Michael McDonagh Date: Thu, 17 Jul 2025 19:26:30 -0400 Subject: [PATCH] Fix typos --- README.md | 2 +- _benchmark/cmark/_data.md | 4 ++-- _benchmark/go/_data.md | 4 ++-- ast/ast.go | 12 ++++++------ ast/block.go | 2 +- ast/inline.go | 2 +- extension/cjk.go | 2 +- extension/cjk_test.go | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1922fd06..83d6c82c 100644 --- a/README.md +++ b/README.md @@ -528,7 +528,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/_benchmark/cmark/_data.md b/_benchmark/cmark/_data.md index 87db650b..0d2b0395 100644 --- a/_benchmark/cmark/_data.md +++ b/_benchmark/cmark/_data.md @@ -2068,7 +2068,7 @@ followed only by [whitespace] or the end of the line.\ HTML blocks continue until they are closed by their appropriate [end condition], or the last line of the document or other [container block](#container-blocks). This means any HTML **within an HTML -block** that might otherwise be recognised as a start condition will +block** that might otherwise be recognized as a start condition will be ignored by the parser and passed through as-is, without changing the parser's state. @@ -2095,7 +2095,7 @@ _world_. In this case, the HTML block is terminated by the newline — the `**Hello**` text remains verbatim — and regular parsing resumes, with a paragraph, -emphasised `world` and inline and block HTML following. +emphasized `world` and inline and block HTML following. All types of [HTML blocks] except type 7 may interrupt a paragraph. Blocks of type 7 may not interrupt a paragraph. diff --git a/_benchmark/go/_data.md b/_benchmark/go/_data.md index 87db650b..0d2b0395 100644 --- a/_benchmark/go/_data.md +++ b/_benchmark/go/_data.md @@ -2068,7 +2068,7 @@ followed only by [whitespace] or the end of the line.\ HTML blocks continue until they are closed by their appropriate [end condition], or the last line of the document or other [container block](#container-blocks). This means any HTML **within an HTML -block** that might otherwise be recognised as a start condition will +block** that might otherwise be recognized as a start condition will be ignored by the parser and passed through as-is, without changing the parser's state. @@ -2095,7 +2095,7 @@ _world_. In this case, the HTML block is terminated by the newline — the `**Hello**` text remains verbatim — and regular parsing resumes, with a paragraph, -emphasised `world` and inline and block HTML following. +emphasized `world` and inline and block HTML following. All types of [HTML blocks] except type 7 may interrupt a paragraph. Blocks of type 7 may not interrupt a paragraph. diff --git a/ast/ast.go b/ast/ast.go index 36ba606f..954b5b6e 100644 --- a/ast/ast.go +++ b/ast/ast.go @@ -97,17 +97,17 @@ type Node interface { SortChildren(comparator func(n1, n2 Node) int) // ReplaceChild replace a node v1 with a node insertee. - // If v1 is not children of this node, ReplaceChild append a insetee to the + // If v1 is not children of this node, ReplaceChild append a insertee to the // tail of the children. ReplaceChild(self, v1, insertee Node) // InsertBefore inserts a node insertee before a node v1. - // If v1 is not children of this node, InsertBefore append a insetee to the + // If v1 is not children of this node, InsertBefore append a insertee to the // tail of the children. InsertBefore(self, v1, insertee Node) // InsertAfterinserts a node insertee after a node v1. - // If v1 is not children of this node, InsertBefore append a insetee to the + // If v1 is not children of this node, InsertBefore append a insertee to the // tail of the children. InsertAfter(self, v1, insertee Node) @@ -128,7 +128,7 @@ type Node interface { // Notice that there are no 'correct' text values for the block nodes. // Result for the block nodes may be different from your expectation. // - // Deprecated: Use other properties of the node to get the text value(i.e. Pragraph.Lines, Text.Value). + // Deprecated: Use other properties of the node to get the text value(i.e. Paragraph.Lines, Text.Value). Text(source []byte) []byte // HasBlankPreviousLines returns true if the row before this node is blank, @@ -175,7 +175,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 @@ -382,7 +382,7 @@ func (n *BaseNode) OwnerDocument() *Document { // Text implements Node.Text . // -// Deprecated: Use other properties of the node to get the text value(i.e. Pragraph.Lines, Text.Value). +// Deprecated: Use other properties of the node to get the text value(i.e. Paragraph.Lines, Text.Value). func (n *BaseNode) Text(source []byte) []byte { var buf bytes.Buffer for c := n.firstChild; c != nil; c = c.NextSibling() { diff --git a/ast/block.go b/ast/block.go index efeea08e..70215e4d 100644 --- a/ast/block.go +++ b/ast/block.go @@ -7,7 +7,7 @@ import ( textm "github.com/yuin/goldmark/text" ) -// A BaseBlock struct implements the Node interface partialliy. +// A BaseBlock struct implements the Node interface partially. type BaseBlock struct { BaseNode lines textm.Segments diff --git a/ast/inline.go b/ast/inline.go index 613eb1ed..f74d7d79 100644 --- a/ast/inline.go +++ b/ast/inline.go @@ -8,7 +8,7 @@ import ( "github.com/yuin/goldmark/util" ) -// A BaseInline struct implements the Node interface partialliy. +// A BaseInline struct implements the Node interface partially. type BaseInline struct { BaseNode } diff --git a/extension/cjk.go b/extension/cjk.go index a3238c20..acbe0ab1 100644 --- a/extension/cjk.go +++ b/extension/cjk.go @@ -25,7 +25,7 @@ const ( // WithEastAsianLineBreaks is a functional option that indicates whether softline breaks // between east asian wide characters should be ignored. -// style defauts to [EastAsianLineBreaksSimple] . +// style defaults to [EastAsianLineBreaksSimple] . func WithEastAsianLineBreaks(style ...EastAsianLineBreaks) CJKOption { return func(c *cjk) { if len(style) == 0 { diff --git a/extension/cjk_test.go b/extension/cjk_test.go index 0eaa26cb..e1009641 100644 --- a/extension/cjk_test.go +++ b/extension/cjk_test.go @@ -75,7 +75,7 @@ func TestEscapedSpace(t *testing.T) { markdown, testutil.MarkdownTestCase{ No: no, - Description: "Escaped space and linkfy extension", + Description: "Escaped space and linkify extension", Markdown: "太郎は\\ **「こんにちわ」**\\ と言った\nんです", Expected: "

太郎は「こんにちわ」と言った\nんです

", }, @@ -192,7 +192,7 @@ func TestEastAsianLineBreaks(t *testing.T) { markdown, testutil.MarkdownTestCase{ No: no, - Description: "WithEastAsianLineBreaks and linkfy extension", + Description: "WithEastAsianLineBreaks and linkify extension", Markdown: "太郎は\\ **「こんにちわ」**\\ と言った\r\nんです", Expected: "

太郎は\\ 「こんにちわ」\\ と言ったんです

", },