The scanner consumed the `+` indicator of a `|+` / `>+` block scalar but mapped it to nothing, so keep was silently treated as clip, and a scanner test baked that in. Add a `keep` case to BlockScalarChomping, recognize `+` in the header scanner, and correct the test. Full keep value semantics (preserving trailing blank lines) depend on scanner blank-line capture and are tracked in #57; this commit fixes the token classification only.
12 lines
233 B
Swift
12 lines
233 B
Swift
extension PureYAML.Parsing {
|
|
enum BlockScalarChomping: String, Equatable, CustomStringConvertible {
|
|
case clip
|
|
case strip
|
|
case keep
|
|
|
|
var description: String {
|
|
rawValue
|
|
}
|
|
}
|
|
}
|