This commit is contained in:
Daniel 2024-05-23 11:30:33 +08:00
parent f10c0bcd4d
commit 98e8083122
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 12 additions and 0 deletions

View file

@ -812,6 +812,10 @@ func GetContainerText(container *ast.Node) string {
buf := &bytes.Buffer{}
buf.Grow(4096)
leaf := treenode.FirstLeafBlock(container)
if nil == leaf {
return ""
}
ast.Walk(leaf, func(n *ast.Node, entering bool) ast.WalkStatus {
if !entering {
return ast.WalkContinue