PureYAML/Sources/Parsing
Mihaela M 2b3d95d214 fix(parsing): chomp the blank lines of an empty block scalar
A block scalar whose only lines are blank never establishes a content
indentation, so its blank lines stayed in the leading-blank buffer and were
discarded when the scalar ended. `keep: |+` over a blank line then resolved to
the empty string rather than the line break keep chomping should preserve.

At stream end, flush the buffered blank lines as content wrapped in an
indent/dedent pair, so the parser builds a block scalar of those lines and
chomping applies: keep preserves the breaks, clip and strip trim them. Only
the stream-end case is handled, where no following line constrains token
ordering; an empty keep scalar before a sibling key is left for later.

Raises yaml-test-suite value-level conformance to 189/194 (97.4%) with the
parse-level and should-error rejection rates unchanged. 456 tests pass.
2026-06-28 22:31:09 +02:00
..
BlockScalarChomping.swift
BlockScalarStyle.swift
CollectionStyle.swift
Event.swift
EventComposer.Merge.swift
EventComposer.swift
EventStreamComposedNode.swift
EventStreamComposer.swift
EventStreamComposerMode.swift
EventStreamContainer.swift
EventStreamContainerKind.swift
Mark.swift
MergeResolution.swift
NodeKind.swift
NodeProperties.swift
NodeResult.swift
ParseError.swift
Parser.Events.swift
Parser.ScalarComposition.swift fix(parsing): keep a non-core-tagged scalar as a string 2026-06-28 22:25:48 +02:00
Parser.swift
Reader.swift
Scalar.swift
ScalarStyle.swift
Scanner.Directives.swift fix(parsing): parse a bare document after a document-end marker 2026-06-28 04:23:06 +02:00
Scanner.FlowContext.swift
Scanner.FlowKey.swift fix(parsing): parse a flow collection before a colon as a mapping key 2026-06-28 18:34:11 +02:00
Scanner.Helpers.swift fix(parsing): end a plain scalar at a tab before a comment 2026-06-28 21:24:59 +02:00
Scanner.Indentation.swift fix(parsing): chomp the blank lines of an empty block scalar 2026-06-28 22:31:09 +02:00
Scanner.Scalars.swift fix(parsing): fold root block scalars with column-0 content 2026-06-28 17:42:38 +02:00
Scanner.swift fix(parsing): keep tabs in block scalar content verbatim 2026-06-28 20:53:40 +02:00
ScannerFlowContextKind.swift
TagNormalizer.swift
Text.swift
Token.swift
TokenCursor.swift
TokenEventParser.Block.swift fix(parsing): keep both breaks at a folded blank by a more-indented line 2026-06-28 21:14:14 +02:00
TokenEventParser.Flow.swift fix(parsing): treat colon-led flow sequence element as empty-key map 2026-06-28 19:43:56 +02:00
TokenEventParser.Helpers.swift
TokenEventParser.swift fix(parsing): parse a bare document after a document-end marker 2026-06-28 04:23:06 +02:00
TokenKind.swift