mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The comment placeholder restoration in `shimCssText` appended an unconditional `+ '\n'` to each non-hash comment replacement. Because `_commentRe` does not consume the newline that follows a comment in the source, that newline already remains in `cssText`. The extra `'\n'` was therefore inserted on top of the existing one, shifting every line after each comment down by one. In files with many comments (e.g. large SCSS preambles) this shifts all subsequent CSS rules far enough that the CSS sourcemap — generated before `shimCssText` runs — points to completely wrong source locations in browser DevTools. The fix is to drop the `+ '\n'`; internal newlines within a multi-line comment are still preserved via `_newLinesRe`, and the trailing newline that follows the comment in `cssText` is already present without any extra injection. |
||
|---|---|---|
| .. | ||
| at_rules_spec.ts | ||
| host_and_host_context_spec.ts | ||
| keyframes_spec.ts | ||
| ng_deep_spec.ts | ||
| polyfills_spec.ts | ||
| process_rules_spec.ts | ||
| repeat_groups_spec.ts | ||
| shadow_css_spec.ts | ||
| utils.ts | ||