From dc2a15c0c6e0a06045616c6e4db19f0f4bc43cac Mon Sep 17 00:00:00 2001 From: alstephenclaypool <41022275+alstephenclaypool@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:58:17 -0400 Subject: [PATCH] fix empty yaml when running vals eval on documents with comment only sections Signed-off-by: Stephen Claypool --- io.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io.go b/io.go index 5e0519e..cf73e89 100644 --- a/io.go +++ b/io.go @@ -69,7 +69,9 @@ func nodesFromReader(reader io.Reader) ([]yaml.Node, error) { } break } - nodes = append(nodes, node) + if len(node.Content[0].Content) > 0 { + nodes = append(nodes, node) + } } return nodes, nil }