
Long scalar values can be split into multiple lines to improve readability. The rules are described in Section 6.5. "Line Folding", https://yaml.org/spec/1.2.2/#65-line-folding. In addition, for flow scalar styles, the Spec states that "All leading and trailing white space characters on each line are excluded from the content", https://yaml.org/spec/1.2.2/#73-flow-scalar-styles. The patch implements these unfolding rules for double-quoted, single-quoted, and plain scalars.
18 lines
432 B
Plaintext
18 lines
432 B
Plaintext
# RUN: yaml-bench -canonical %s | FileCheck %s --strict-whitespace
|
|
# CHECK: !!map {
|
|
# CHECK-NEXT: ? !!str "simple key"
|
|
# CHECK-NEXT: : !!map {
|
|
# CHECK-NEXT: ? !!str "also simple"
|
|
# CHECK-NEXT: : !!str "value",
|
|
# CHECK-NEXT: ? !!str "not a simple key"
|
|
# CHECK-NEXT: : !!str "any value",
|
|
# CHECK-NEXT: },
|
|
# CHECK-NEXT: }
|
|
|
|
"simple key" : {
|
|
"also simple" : value,
|
|
? "not a
|
|
simple key" : "any
|
|
value"
|
|
}
|