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

Improve recognition of generated, source-mapped files #4661

Merged
merged 4 commits into from
Oct 11, 2019
Merged

Conversation

Alhadis
Copy link
Collaborator

@Alhadis Alhadis commented Oct 3, 2019

Description

Fixes #4659 by testing for CSS sourceMapURL pragmas, which Linguist ignores altogether (though it has absolutely no reason to).

I've also tightened the current logic to support an alternative syntax the Source-Map V3 spec explains was in-use at one point, but now discouraged (emphasis mine):

Note: The prefix for this annotation was initially //@ however this conflicts with Internet Explorer’s Conditional Compilation and was changed to //#. It is reasonable for tools to also accept //@ but //# is preferred.

Checklist:

  • I am adding new or changing current functionality
    • I have added or updated the tests for the new or changed functionality.

/cc @hvaoc @lildude

Copy link

@hvaoc hvaoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Alhadis Alhadis merged commit be1970a into master Oct 11, 2019
@Alhadis Alhadis deleted the source-maps branch October 11, 2019 15:31
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source-mapped CSS not recognised as generated
3 participants