-
-
Notifications
You must be signed in to change notification settings - Fork 170
Fix whitespace removal inside nested concat and template expressions #396
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
Conversation
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.
Looks good, just a question though:
tests/tests.ts
Outdated
[ | ||
`<div [ngClass]="' flex ' + ' underline ' + ' block '"></div>`, | ||
`<div [ngClass]="'flex ' + ' underline' + ' block'"></div>`, | ||
`<div [ngClass]="'flex ' + ' underline ' + ' block'"></div>`, |
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.
Hah, oops
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.
Maybe we can add an additional test with some whitespace in the middle.
[
`<div [ngClass]="' flex ' + ' italic underline ' + ' block '"></div>`,
`<div [ngClass]="' flex ' + ' italic underline ' + ' block '"></div>`,
]
Just to ensure that we are still taking care of whitespace in the middle where it's safe?
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.
I'll do that
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.
Technically there's a lot more cases where it's safe to drop these but that requires a more complex "understanding" of the AST.
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.
Updated the test 👍
Fixes #328
Fixes #337
Fixes #305