Repository navigation
Commit aef7cf8
committed
refactor(css): make the streamed block's output bound its own
The `;` a `}` makes redundant is dropped by walking the output back from the
end, bounded by where the block started. That bound was taken while the
block's opener was still held back, so the piece it names can hold output
from before the block — the walk stops short of it today only because the
opener's piece ends in `{` and is never taken back, which is an invariant
nothing states. Take the bound after cutting the tail, so it names the
block's own first piece and the walk cannot reach past it either way.
The bound now covers a case it did not: a run of retractable pieces already
cuts after each, so a mark taken between them was mid-tail.
Raised by CodeRabbit as a correctness risk. It is not reachable today —
reverting either the cut or the bound entirely leaves every test passing —
so this is the invariant made explicit rather than a fix. The new case pins
what is observable: a declaration before a streamed block keeps its `;` when
the block drops its own.1 parent b09558a commit aef7cf8
4 files changed
Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4154 | 4154 | | |
4155 | 4155 | | |
4156 | 4156 | | |
4157 | | - | |
| 4157 | + | |
4158 | 4158 | | |
4159 | 4159 | | |
4160 | 4160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
234 | 238 | | |
235 | 239 | | |
236 | | - | |
| 240 | + | |
| 241 | + | |
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
| |||
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 325 | + | |
| 326 | + | |
324 | 327 | | |
325 | 328 | | |
326 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1020 | 1020 | | |
1021 | 1021 | | |
1022 | 1022 | | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1023 | 1033 | | |
1024 | 1034 | | |
1025 | 1035 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21596 | 21596 | | |
21597 | 21597 | | |
21598 | 21598 | | |
21599 | | - | |
| 21599 | + | |
| 21600 | + | |
| 21601 | + | |
| 21602 | + | |
| 21603 | + | |
| 21604 | + | |
| 21605 | + | |
| 21606 | + | |
21600 | 21607 | | |
21601 | 21608 | | |
21602 | 21609 | | |
| |||
0 commit comments