-
Notifications
You must be signed in to change notification settings - Fork 105
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
Source maps do not have to be on their own line #133
Source maps do not have to be on their own line #133
Conversation
Bump on this. |
Do you need to make any changes to this now that #132 is merged? |
…e/sourcemaps-do-not-have-to-be-on-their-own-line
@brenogazzola Thanks for the reminder - updated to resolve conflicts after merge of #132 and now ready for review. |
@pond I apologize for not merging this PR for so long. I was going to merge it now, but it seems there are conflicts again. Could you fix them, and I'll immediately merge this? |
…e/sourcemaps-do-not-have-to-be-on-their-own-line
@brenogazzola I too have been extraordinarily busy and apologies in turn for taking so long to fix the conflicts - they were a little fiddly. It's done now and CI is green. Hopefully a merge can happen before conflicts re-emerge! |
@brenogazzola (bump on this, thanks...) |
@pond Thanks! |
Ah! Great. Legend. Thanks |
While some older resources claim that source maps must be on their own line at the end of a file and while Propshaft's Regexp for this asserts such, this is not the case. Consider:
...in
package.json
. This results inapplication.css
including a source map comment in/* ... */
form at the end of the last line of minified CSS:...noting that a terminating line feed is also present afterwards. Since this is a CSS comment appearing at the end of a line it is syntactically valid and browsers such as Chrome do read the source map. Under e.g. Propshaft 0.7.0, CSS source maps promptly break because it doesn't consider the not-on-own-line map comment to be valid.
\Z
) rather than start-of-line (^
)*/
in comments of that form, so the internal private methods now need to be given both an opening and closing string for the comment captures//#
and CSS with/* ... */
style comments included