mirror of
https://github.com/apple/pkl.git
synced 2026-09-10 11:51:53 +02:00
YamlEmitter only routed a string into YamlEscaper when it held a character below 0x20, so 0x7F, the C1 block, U+2028 and U+2029 went out as plain scalars. They are not `c-printable` (YAML 1.2 spec 5.1), and NEL, LS and PS are line breaks in YAML 1.1, so the rendered document is either rejected or silently split by a reader. The escapes added in #1165 for 0x85, 0xA0, U+2028, and U+2029 could only fire when some other character happened to open that gate. Share one predicate between the two sites that decide, and give 0x7F-0x9F the 8-bit escape they lack.