Commit Graph
3 Commits
Author SHA1 Message Date
dualfroz 2aa6b7469f Describe this repository 2026-10-22 21:03:34 +02:00
dualfroz 0717920c8d fix(cst): keep a block scalar's content indent in setScalarValue
setScalarValue reconstructed a block scalar's content indent as token.indent
plus one step, but token.indent is the indent of the node, not of its
contents. Contents sitting further in than one step were pulled back, and
without afterKey they lost their indentation entirely, which for a block
scalar in a collection changes what the document means rather than just how
it looks.

resolveBlockScalar already measures the real content indent when reading: an
explicit indentation indicator counts from the node indent, and otherwise the
indent is that of the first non-empty line. Measure the same way before
stringifying, and fall back to the previous behaviour when a block scalar has
no contents to measure.

Fixes #349
2026-09-03 14:16:12 +02:00
upstream 6744b4a7a9 Upstream eemeli/yaml state of the touched files before ed1bc2f909 2026-09-03 14:16:12 +02:00