Commit a811c12
authored
fix(ui): quote YAML scalars containing embedded newlines (#7820)
yamlScalar decided a value needs quoting from value.trim() !== value plus
a special-character regex. trim() only strips edge whitespace, and the
regex omitted line breaks, so a value with an embedded newline and no other
flagged character (e.g. "claude 3.7\nignore_findings true") was emitted as
a raw multi-line scalar -- a stray top-level line that breaks the generated
.loopover.yml, violating the file's "a partial form never produces invalid
output" invariant. Same incomplete-guard bug class as the csv-export fix.
Add \n and \r to the needsQuote regex so any line-break-containing value
goes through the existing JSON.stringify quoting path. Adds embedded-newline
and carriage-return regression cases to config-generator-yaml.test.ts.
Closes #7786
Co-authored-by: jaytbarimbao-collab <300663773+jaytbarimbao-collab@users.noreply.github.com>1 parent 9c9188b commit a811c12
2 files changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
79 | 99 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | | - | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
0 commit comments