[Yaml] Fixed #6773

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6773
| License       | MIT
| Doc PR        | n/a

Also added a full set of tests for all combinations of literal/folded blocks and strip/clip/keep chomping indicators in both mid-file and end-of file positions.