js-yaml
js-yaml copied to clipboard
Unmatched quotes at the end of a value not caught as issue
hi, it looks like having an unmatched quote at the end of a value is not caught as a syntax error.
sidecars:
sidecars1:
cpu: 42'
result is ok:
{
"sidecars": {
"sidecars1": {
"cpu": "42'"
}
}
}
While this may seem harmless, it actually results in a crash on CI/CD such as harness.
having it at the beginning of the value works as expected:
sidecars:
sidecars1:
cpu: '42
YAMLException: unexpected end of the stream within a single quoted scalar (4:1)
1 | sidecars:
2 | sidecars1:
3 | cpu: '42
4 |
-----^