Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug: BaseNode.RemoveChildren only set the first child as nil #87

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

qiuzhiqian
Copy link

if do c.SetNextSibling(nil) and c = c.NextSibling(). After remove the first child the var c is always nil.the next child will not be set nil

…emove the first child the var c is always nil.the next child will not be set nil
@qiuzhiqian
Copy link
Author

$ go test -v github.com/yuin/goldmark/ast -run TestRemoveChildren
=== RUN TestRemoveChildren
--- PASS: TestRemoveChildren (0.00s)
ast_test.go:17: &{BaseBlock:{BaseNode:{firstChild: lastChild: parent: next: prev: childCount:0 attributes:[]} blankPreviousLines:false lines:}}
PASS
ok github.com/yuin/goldmark/ast 0.003s

@qiuzhiqian qiuzhiqian closed this Jan 9, 2020
@qiuzhiqian qiuzhiqian reopened this Jan 9, 2020
@yuin yuin merged commit 5294fa5 into yuin:master Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants