mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-11 21:16:27 +00:00
Update dependencies and vendor (#1761)
This commit is contained in:
9
vendor/github.com/gomarkdown/markdown/parser/block.go
generated
vendored
9
vendor/github.com/gomarkdown/markdown/parser/block.go
generated
vendored
@ -1412,6 +1412,13 @@ gatherlines:
|
||||
// is this a nested list item?
|
||||
case (p.uliPrefix(chunk) > 0 && !p.isHRule(chunk)) || p.oliPrefix(chunk) > 0 || p.dliPrefix(chunk) > 0:
|
||||
|
||||
// if indent is 4 or more spaces on unordered or ordered lists
|
||||
// we need to add leadingWhiteSpaces + 1 spaces in the beginning of the chunk
|
||||
if indentIndex >= 4 && p.dliPrefix(chunk) <= 0 {
|
||||
leadingWhiteSpaces := skipChar(chunk, 0, ' ')
|
||||
chunk = data[ line+indentIndex - (leadingWhiteSpaces + 1) : i]
|
||||
}
|
||||
|
||||
// to be a nested list, it must be indented more
|
||||
// if not, it is either a different kind of list
|
||||
// or the next item in the same list
|
||||
@ -1484,7 +1491,7 @@ gatherlines:
|
||||
}
|
||||
|
||||
// add the line into the working buffer without prefix
|
||||
raw.Write(data[line+indentIndex : i])
|
||||
raw.Write(chunk)
|
||||
|
||||
line = i
|
||||
}
|
||||
|
15
vendor/github.com/gomarkdown/markdown/parser/block_table.go
generated
vendored
15
vendor/github.com/gomarkdown/markdown/parser/block_table.go
generated
vendored
@ -25,6 +25,11 @@ func (p *Parser) tableRow(data []byte, columns []ast.CellAlignFlags, header bool
|
||||
|
||||
cellStart := i
|
||||
|
||||
// If we are in a codespan we should discount any | we see, check for that here and skip ahead.
|
||||
if isCode, _ := codeSpan(p, data[i:], 0); isCode > 0 {
|
||||
i += isCode - 1
|
||||
}
|
||||
|
||||
for i < n && (data[i] != '|' || isBackslashEscaped(data, i)) && data[i] != '\n' {
|
||||
i++
|
||||
}
|
||||
@ -84,6 +89,11 @@ func (p *Parser) tableFooter(data []byte) bool {
|
||||
n := len(data)
|
||||
i := skipCharN(data, 0, ' ', 3)
|
||||
for ; i < n && data[i] != '\n'; i++ {
|
||||
// If we are in a codespan we should discount any | we see, check for that here and skip ahead.
|
||||
if isCode, _ := codeSpan(p, data[i:], 0); isCode > 0 {
|
||||
i += isCode - 1
|
||||
}
|
||||
|
||||
if data[i] == '|' && !isBackslashEscaped(data, i) {
|
||||
colCount++
|
||||
continue
|
||||
@ -111,6 +121,11 @@ func (p *Parser) tableHeader(data []byte, doRender bool) (size int, columns []as
|
||||
headerIsUnderline := true
|
||||
headerIsWithEmptyFields := true
|
||||
for i = 0; i < len(data) && data[i] != '\n'; i++ {
|
||||
// If we are in a codespan we should discount any | we see, check for that here and skip ahead.
|
||||
if isCode, _ := codeSpan(p, data[i:], 0); isCode > 0 {
|
||||
i += isCode - 1
|
||||
}
|
||||
|
||||
if data[i] == '|' && !isBackslashEscaped(data, i) {
|
||||
colCount++
|
||||
}
|
||||
|
Reference in New Issue
Block a user