PureYAML/Sources
Mihaela M a5b8986d5e fix(parsing): fold root block scalars with column-0 content
A block scalar that is the document's own root node (`>`, `|`, or after
`---` on the same line) may begin its content at column 0: the document node's
indentation is -1, so column-0 content is still more indented than its parent.
The scanner read the base level as 0 and required content strictly deeper than
it, so the lines fell through indentation handling and were mis-scanned as a
stray plain scalar after the document, raising "expected document boundary".

A root block scalar and an under-indented nested one (`- |` then unindented
content) present identical indentation state at the first content line, so the
two cannot be told apart there. Capture the distinction at header-scan time
instead: a root block scalar has the base indentation and no mapping value,
explicit key, block-entry implicit indent, or flow context introducing it on
its line. Only then is its parent the document; a sequence item or mapping
value keeps its parent's indent as the floor, so its under-indented content is
still rejected, unchanged.

Raises yaml-test-suite parse-level to 291/333 (87.4%) and value-level to
173/191 (90.6%). A regression suite covers the root cases (including a leading
'#' as literal content) and the nested under-indented cases that must error.
410 tests pass.
2026-06-28 17:42:38 +02:00
..
Coding feat(codable): broaden compatibility coverage 2026-06-05 12:49:20 +02:00
Decoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Emitting feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Encoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Model feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Parsing fix(parsing): fold root block scalars with column-0 content 2026-06-28 17:42:38 +02:00
Stream feat(parser): add multi-document stream parsing 2026-06-05 14:55:54 +02:00
Tagged feat(validation): enforce tagged mapping-key uniqueness 2026-06-28 17:03:20 +02:00
Validation feat(validation): enforce tagged mapping-key uniqueness 2026-06-28 17:03:20 +02:00
API.swift feat(emitting): dump YAML streams 2026-06-05 17:14:41 +02:00
PureYAML.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00