summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gomarkdown/markdown/ast
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-11-27 00:42:16 +0100
committerGitHub <noreply@github.com>2022-11-27 00:42:16 +0100
commit4fd0a7672777f0ed15692ae2ba47838208537558 (patch)
treeb119834a8b9ee78aa8f1b2ad05efa7da50516cbf /vendor/github.com/gomarkdown/markdown/ast
parent6da9d567dc9195e9a5211f23a6795a41f56a1bfc (diff)
downloadmatterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.gz
matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.bz2
matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.zip
Update dependencies (#1929)
Diffstat (limited to 'vendor/github.com/gomarkdown/markdown/ast')
-rw-r--r--vendor/github.com/gomarkdown/markdown/ast/node.go8
1 files changed, 6 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