Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions _benchmark/cmark/_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions _benchmark/go/_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion ast/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ast/inline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion extension/cjk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions extension/cjk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<p>太郎は<strong>「こんにちわ」</strong>と言った\nんです</p>",
},
Expand Down Expand Up @@ -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: "<p>太郎は\\ <strong>「こんにちわ」</strong>\\ と言ったんです</p>",
},
Expand Down