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

Fix comment handling #24

Merged
merged 1 commit into from
Jun 8, 2023
Merged

Fix comment handling #24

merged 1 commit into from
Jun 8, 2023

Conversation

jonmast
Copy link
Contributor

@jonmast jonmast commented May 30, 2023

Overwrite the originalText property with our sorted CSS. The Prettier CSS formatter indexes into the text to pull the comment value, which breaks if the lines have been reordered.

Fixes #23

Overwrite the originalText property with our sorted CSS. The Prettier
CSS formatter indexes into the text to pull the comment value, which
breaks if the lines have been reordered.
@jonmast
Copy link
Contributor Author

jonmast commented May 30, 2023

Overriding the originalText property of the options feels a little hacky but I didn't see any nicer options, I'm open to suggestions.

@Siilwyn
Copy link
Owner

Siilwyn commented Jun 8, 2023

Thank you for the fix! I don't see any cleaner alternative either sadly.

@Siilwyn Siilwyn merged commit 12ad12d into Siilwyn:main Jun 8, 2023
1 check passed
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.

Embedded CSS with comments produces invalid output
2 participants