Commit a560810
committed
Don't include inner attribute ranges in
The current code is this:
```
self.capture_state.replace_ranges.push((start_pos..end_pos, Some(target)));
self.capture_state.replace_ranges.extend(inner_attr_replace_ranges);
```
What's not obvious is that every range in `inner_attr_replace_ranges`
must be a strict sub-range of `start_pos..end_pos`. Which means, in
`LazyAttrTokenStreamImpl::to_attr_token_stream`, they will be done
first, and then the `start_pos..end_pos` replacement will just overwrite
them. So they aren't needed.CaptureState.1 parent 6106b05 commit a560810
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
342 | 341 | | |
343 | 342 | | |
344 | 343 | | |
| |||
369 | 368 | | |
370 | 369 | | |
371 | 370 | | |
372 | | - | |
| 371 | + | |
373 | 372 | | |
374 | 373 | | |
375 | 374 | | |
376 | | - | |
377 | | - | |
378 | 375 | | |
379 | 376 | | |
380 | 377 | | |
| |||
384 | 381 | | |
385 | 382 | | |
386 | 383 | | |
387 | | - | |
388 | 384 | | |
389 | 385 | | |
390 | 386 | | |
| |||
0 commit comments