Closed k-jiang closed 8 months ago
Why?
Well I'm actually trying to get the exact offset of the string value
. By instinct I would think doc.contents.items[0].value.range
only indicating the start and end of the value
itself, yet it seems covering something else as well.
I did not read through the YAML specification. If the value.range
does work as intended, that should be fine.
I will try to calculate it through srcToken
though it is a bit of complicated 😂
For a block scalar, the header is a required part of the source to determining its value. So what you're asking for would be analogous for the range of a quoted scalar like "foo"
to not include the "
marks.
Describe the bug The "start offset" of a Block Scalar value should be the beginning of the string value, not the "|-" part
To Reproduce
Expected behaviour
Versions:
yaml
: 2.4.1