parseYaml inserts null when document stream starts with a comment
Open
bug
- Dominant language
- Go
- Stars
- 1.8k
- Forks
- 263
- PR merge metrics
- No merged PRs in 30d
Description
I just found out that a null value is added to the array when I parse a stream of YAML documents that starts with a comment.
**YAML**
```yaml
# Test
---
foo: bar
---
baz: cuux
```
**Jsonnet**
```jsonnet
std.parseYaml(importstr 'test.yaml')
```
**Result**
```json
[
null,
{
"foo": "bar"
},
{
"baz": "cuux"
}
]
```
**Expected Result**
```json
[
{
"foo": "bar"
},
{
"baz": "cuux"
}
]
```
**Current Workaround**
```jsonnet
std.prune(std.parseYaml(importstr 'test.yaml'))
```
Contributor guide
Assessment
This issue has not been assessed yet.