forked from forgejo/forgejo
Update Goldmark v1.1.25 -> v1.1.32 (#12048)
This commit is contained in:
parent
c86478ec47
commit
9ef2f62a79
10 changed files with 85 additions and 26 deletions
5
vendor/github.com/yuin/goldmark/parser/atx_heading.go
generated
vendored
5
vendor/github.com/yuin/goldmark/parser/atx_heading.go
generated
vendored
|
@ -126,7 +126,8 @@ func (b *atxHeadingParser) Open(parent ast.Node, reader text.Reader, pc Context)
|
|||
if closureClose > 0 {
|
||||
reader.Advance(closureClose)
|
||||
attrs, ok := ParseAttributes(reader)
|
||||
parsed = ok
|
||||
rest, _ := reader.PeekLine()
|
||||
parsed = ok && util.IsBlank(rest)
|
||||
if parsed {
|
||||
for _, attr := range attrs {
|
||||
node.SetAttribute(attr.Name, attr.Value)
|
||||
|
@ -232,7 +233,7 @@ func parseLastLineAttributes(node ast.Node, reader text.Reader, pc Context) {
|
|||
}
|
||||
lr.Advance(1)
|
||||
}
|
||||
if ok && util.IsBlank(line[end.Stop:]) {
|
||||
if ok && util.IsBlank(line[end.Start:]) {
|
||||
for _, attr := range attrs {
|
||||
node.SetAttribute(attr.Name, attr.Value)
|
||||
}
|
||||
|
|
2
vendor/github.com/yuin/goldmark/parser/html_block.go
generated
vendored
2
vendor/github.com/yuin/goldmark/parser/html_block.go
generated
vendored
|
@ -93,7 +93,7 @@ var htmlBlockType5Close = []byte{']', ']', '>'}
|
|||
|
||||
var htmlBlockType6Regexp = regexp.MustCompile(`^[ ]{0,3}</?([a-zA-Z0-9]+)(?:\s.*|>.*|/>.*|)\n?$`)
|
||||
|
||||
var htmlBlockType7Regexp = regexp.MustCompile(`^[ ]{0,3}<(/)?([a-zA-Z0-9]+)(` + attributePattern + `*)(:?>|/>)\s*\n?$`)
|
||||
var htmlBlockType7Regexp = regexp.MustCompile(`^[ ]{0,3}<(/)?([a-zA-Z0-9\-]+)(` + attributePattern + `*)(:?>|/>)\s*\n?$`)
|
||||
|
||||
type htmlBlockParser struct {
|
||||
}
|
||||
|
|
2
vendor/github.com/yuin/goldmark/parser/list.go
generated
vendored
2
vendor/github.com/yuin/goldmark/parser/list.go
generated
vendored
|
@ -191,7 +191,7 @@ func (b *listParser) Continue(node ast.Node, reader text.Reader, pc Context) Sta
|
|||
isHeading := false
|
||||
last := pc.LastOpenedBlock().Node
|
||||
if ast.IsParagraph(last) {
|
||||
c, ok := matchesSetextHeadingBar(line)
|
||||
c, ok := matchesSetextHeadingBar(line[match[3]-1:])
|
||||
if ok && c == '-' {
|
||||
isHeading = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue