Skip to content
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

(feat) trim whitespace in class attributes #356

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

dummdidumm
Copy link
Member

fixes #339

@dummdidumm dummdidumm mentioned this pull request Mar 22, 2023
@dummdidumm dummdidumm merged commit a94563c into sveltejs:master Mar 22, 2023
@dummdidumm dummdidumm deleted the class-whitespace branch March 22, 2023 10:32
@ptrxyz
Copy link

ptrxyz commented Apr 12, 2023

I think this does not shrink/remove whitespaces at the beginning of the string.
My testing pattern was simply this:

<div class="   something    ">

Trailing whitespace is removed, yet the leading one remains the same. Am I doing it wrong?

@ptrxyz
Copy link

ptrxyz commented Apr 12, 2023

Added comments in the code in case this was not desired behavior.

@dummdidumm
Copy link
Member Author

Could you open a new issue so we can track this? Sounds like a bug - the idea was to only keep whitespace at the start of new lines after the first line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra whitespace in class attributes should be removed.
2 participants