diff options
author | Wim <wim@42.be> | 2022-11-27 00:42:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 00:42:16 +0100 |
commit | 4fd0a7672777f0ed15692ae2ba47838208537558 (patch) | |
tree | b119834a8b9ee78aa8f1b2ad05efa7da50516cbf /vendor/github.com/gomarkdown/markdown | |
parent | 6da9d567dc9195e9a5211f23a6795a41f56a1bfc (diff) | |
download | matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.gz matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.bz2 matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.zip |
Update dependencies (#1929)
Diffstat (limited to 'vendor/github.com/gomarkdown/markdown')
-rw-r--r-- | vendor/github.com/gomarkdown/markdown/ast/node.go | 8 | ||||
-rw-r--r-- | vendor/github.com/gomarkdown/markdown/parser/block.go | 10 | ||||
-rw-r--r-- | vendor/github.com/gomarkdown/markdown/parser/inline.go | 1 |
3 files changed, 17 insertions, 2 deletions
diff --git a/vendor/github.com/gomarkdown/markdown/ast/node.go b/vendor/github.com/gomarkdown/markdown/ast/node.go index e2031193..1d558dd3 100644 --- a/vendor/github.com/gomarkdown/markdown/ast/node.go +++ b/vendor/github.com/gomarkdown/markdown/ast/node.go @@ -157,9 +157,13 @@ func (l *Leaf) GetChildren() []Node { return nil } -// SetChildren will panic becuase Leaf cannot have children +// SetChildren will panic if trying to set non-empty children +// because Leaf cannot have children func (l *Leaf) SetChildren(newChildren []Node) { - panic("leaf node cannot have children") + if len(newChildren) != 0 { + panic("leaf node cannot have children") + } + } // Document represents markdown document node, a root of ast diff --git a/vendor/github.com/gomarkdown/markdown/parser/block.go b/vendor/github.com/gomarkdown/markdown/parser/block.go index eda9be7a..490871c7 100644 --- a/vendor/github.com/gomarkdown/markdown/parser/block.go +++ b/vendor/github.com/gomarkdown/markdown/parser/block.go @@ -1419,6 +1419,16 @@ gatherlines: chunk := data[line+indentIndex : i] + // If there is a fence line (marking starting of a code block) + // without indent do not process it as part of the list. + if p.extensions&FencedCode != 0 { + fenceLineEnd, _ := isFenceLine(chunk, nil, "") + if fenceLineEnd > 0 && indent == 0 { + *flags |= ast.ListItemEndOfList + break gatherlines + } + } + // evaluate how this line fits in switch { // is this a nested list item? diff --git a/vendor/github.com/gomarkdown/markdown/parser/inline.go b/vendor/github.com/gomarkdown/markdown/parser/inline.go index 70d38f29..035d90a0 100644 --- a/vendor/github.com/gomarkdown/markdown/parser/inline.go +++ b/vendor/github.com/gomarkdown/markdown/parser/inline.go @@ -157,6 +157,7 @@ func codeSpan(p *Parser, data []byte, offset int) (int, ast.Node) { } if !IsSpace(data[j]) { hasCharsAfterDelimiter = true + break } } |