New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compiler): maintain multiline CSS selectors during CSS scoping #55509
Conversation
933ade0
to
ee07635
Compare
Previously, multiline selectors were being converted into single lines, resulting in sourcemap disruptions due to shifts in line numbers. Closes angular#55508
@@ -658,8 +658,8 @@ export class ShadowCss { | |||
|
|||
private _scopeSelector(selector: string, scopeSelector: string, hostSelector: string): string { | |||
return selector | |||
.split(',') | |||
.map((part) => part.trim().split(_shadowDeepSelectors)) | |||
.split(/ ?, ?/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use \s
here rather than an actual space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No otherwise the newlines will get lost which would cause the sourcemaps to break.
Caretaker note: looks like this PR might have some risk in g3, will proceed with the merge on Monday, 05/06. |
This PR was merged into the repository by commit 3e1d6e9. |
Previously, multiline selectors were being converted into single lines, resulting in sourcemap disruptions due to shifts in line numbers.
Closes #55508