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

Prevent damage to /* ... */ comments with missing source maps #132

Conversation

pond
Copy link
Contributor

@pond pond commented Mar 7, 2023

If a source map is missing in a JS or CSS file that uses the /* ... */ style of comments, Propshaft would inadvertently substitute nothing via gsub for the opening comment as well as the source map part, leaving a broken trailing */.

Fixed, with test coverage to prove it.

@pond
Copy link
Contributor Author

pond commented Mar 21, 2023

Bump on this.

@pond
Copy link
Contributor Author

pond commented Mar 29, 2023

Another bump here. To be clear, Propshaft is corrupting data without this fix, albeit in a way that is relatively benign since it breaks the comment at the very end of the file.

@brenogazzola brenogazzola merged commit 69c285f into rails:main May 7, 2023
@brenogazzola
Copy link
Collaborator

Thank you for the contribution @pond. Sorry it took me so long to check and merge this.

@pond
Copy link
Contributor Author

pond commented May 8, 2023

Awesome. Thanks for merging!

@pond pond deleted the feature/source-map-removal-does-not-damage-comments branch May 8, 2023 05:45
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.

2 participants