Commit d805b06
committed
fix(faces/pseudo): preserve indentation in transform_set
`transform_set` was calling `String.trim line` immediately, discarding
any leading whitespace. Statements like ` set x to expr` inside a
function body would lower to `let x = expr` at column 0, producing a
snapshot mismatch with the 4-space-indented expected output.
Fix: capture the leading indent before trimming and prepend it to the
generated `let`/`let mut` expression.
https://claude.ai/code/session_01Vrh2f1G8tf7ZbNcKh9r5U91 parent 264e378 commit d805b06
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
170 | | - | |
| 172 | + | |
171 | 173 | | |
172 | | - | |
| 174 | + | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| |||
0 commit comments