[chore]: Bump github.com/yuin/goldmark from 1.5.5 to 1.5.6 (#2140)

This commit is contained in:
dependabot[bot] 2023-08-21 06:39:14 +00:00 committed by GitHub
commit 36dceac56c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 1872 additions and 1694 deletions

View file

@ -39,7 +39,7 @@ func NewNodeKind(name string) NodeKind {
return kindMax
}
// An Attribute is an attribute of the Node
// An Attribute is an attribute of the Node.
type Attribute struct {
Name []byte
Value interface{}
@ -248,7 +248,7 @@ func (n *BaseNode) RemoveChildren(self Node) {
n.childCount = 0
}
// SortChildren implements Node.SortChildren
// SortChildren implements Node.SortChildren.
func (n *BaseNode) SortChildren(comparator func(n1, n2 Node) int) {
var sorted Node
current := n.firstChild
@ -358,7 +358,7 @@ func (n *BaseNode) InsertBefore(self, v1, insertee Node) {
}
}
// OwnerDocument implements Node.OwnerDocument
// OwnerDocument implements Node.OwnerDocument.
func (n *BaseNode) OwnerDocument() *Document {
d := n.Parent()
for {
@ -399,7 +399,7 @@ func (n *BaseNode) SetAttribute(name []byte, value interface{}) {
n.attributes = append(n.attributes, Attribute{name, value})
}
// SetAttributeString implements Node.SetAttributeString
// SetAttributeString implements Node.SetAttributeString.
func (n *BaseNode) SetAttributeString(name string, value interface{}) {
n.SetAttribute(util.StringToReadOnlyBytes(name), value)
}
@ -422,12 +422,12 @@ func (n *BaseNode) AttributeString(s string) (interface{}, bool) {
return n.Attribute(util.StringToReadOnlyBytes(s))
}
// Attributes implements Node.Attributes
// Attributes implements Node.Attributes.
func (n *BaseNode) Attributes() []Attribute {
return n.attributes
}
// RemoveAttributes implements Node.RemoveAttributes
// RemoveAttributes implements Node.RemoveAttributes.
func (n *BaseNode) RemoveAttributes() {
n.attributes = nil
}

View file

@ -14,12 +14,12 @@ type BaseBlock struct {
lines *textm.Segments
}
// Type implements Node.Type
// Type implements Node.Type.
func (b *BaseBlock) Type() NodeType {
return TypeBlock
}
// IsRaw implements Node.IsRaw
// IsRaw implements Node.IsRaw.
func (b *BaseBlock) IsRaw() bool {
return false
}
@ -34,7 +34,7 @@ func (b *BaseBlock) SetBlankPreviousLines(v bool) {
b.blankPreviousLines = v
}
// Lines implements Node.Lines
// Lines implements Node.Lines.
func (b *BaseBlock) Lines() *textm.Segments {
if b.lines == nil {
b.lines = textm.NewSegments()
@ -42,7 +42,7 @@ func (b *BaseBlock) Lines() *textm.Segments {
return b.lines
}
// SetLines implements Node.SetLines
// SetLines implements Node.SetLines.
func (b *BaseBlock) SetLines(v *textm.Segments) {
b.lines = v
}
@ -72,7 +72,7 @@ func (n *Document) Kind() NodeKind {
return KindDocument
}
// OwnerDocument implements Node.OwnerDocument
// OwnerDocument implements Node.OwnerDocument.
func (n *Document) OwnerDocument() *Document {
return n
}
@ -431,19 +431,19 @@ func NewListItem(offset int) *ListItem {
type HTMLBlockType int
const (
// HTMLBlockType1 represents type 1 html blocks
// HTMLBlockType1 represents type 1 html blocks.
HTMLBlockType1 HTMLBlockType = iota + 1
// HTMLBlockType2 represents type 2 html blocks
// HTMLBlockType2 represents type 2 html blocks.
HTMLBlockType2
// HTMLBlockType3 represents type 3 html blocks
// HTMLBlockType3 represents type 3 html blocks.
HTMLBlockType3
// HTMLBlockType4 represents type 4 html blocks
// HTMLBlockType4 represents type 4 html blocks.
HTMLBlockType4
// HTMLBlockType5 represents type 5 html blocks
// HTMLBlockType5 represents type 5 html blocks.
HTMLBlockType5
// HTMLBlockType6 represents type 6 html blocks
// HTMLBlockType6 represents type 6 html blocks.
HTMLBlockType6
// HTMLBlockType7 represents type 7 html blocks
// HTMLBlockType7 represents type 7 html blocks.
HTMLBlockType7
)

View file

@ -13,12 +13,12 @@ type BaseInline struct {
BaseNode
}
// Type implements Node.Type
// Type implements Node.Type.
func (b *BaseInline) Type() NodeType {
return TypeInline
}
// IsRaw implements Node.IsRaw
// IsRaw implements Node.IsRaw.
func (b *BaseInline) IsRaw() bool {
return false
}
@ -33,12 +33,12 @@ func (b *BaseInline) SetBlankPreviousLines(v bool) {
panic("can not call with inline nodes.")
}
// Lines implements Node.Lines
// Lines implements Node.Lines.
func (b *BaseInline) Lines() *textm.Segments {
panic("can not call with inline nodes.")
}
// SetLines implements Node.SetLines
// SetLines implements Node.SetLines.
func (b *BaseInline) SetLines(v *textm.Segments) {
panic("can not call with inline nodes.")
}
@ -132,7 +132,8 @@ func (n *Text) Merge(node Node, source []byte) bool {
if !ok {
return false
}
if n.Segment.Stop != t.Segment.Start || t.Segment.Padding != 0 || source[n.Segment.Stop-1] == '\n' || t.IsRaw() != n.IsRaw() {
if n.Segment.Stop != t.Segment.Start || t.Segment.Padding != 0 ||
source[n.Segment.Stop-1] == '\n' || t.IsRaw() != n.IsRaw() {
return false
}
n.Segment.Stop = t.Segment.Stop
@ -214,7 +215,7 @@ func MergeOrReplaceTextSegment(parent Node, n Node, s textm.Segment) {
}
}
// A String struct is a textual content that has a concrete value
// A String struct is a textual content that has a concrete value.
type String struct {
BaseInline
@ -305,7 +306,7 @@ func (n *CodeSpan) IsBlank(source []byte) bool {
return true
}
// Dump implements Node.Dump
// Dump implements Node.Dump.
func (n *CodeSpan) Dump(source []byte, level int) {
DumpHelper(n, source, level, nil, nil)
}
@ -467,7 +468,7 @@ type AutoLink struct {
// Inline implements Inline.Inline.
func (n *AutoLink) Inline() {}
// Dump implements Node.Dump
// Dump implements Node.Dump.
func (n *AutoLink) Dump(source []byte, level int) {
segment := n.value.Segment
m := map[string]string{