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

source maps ignoring commented out lines #771

Closed
philippkuehn opened this issue Dec 26, 2014 · 5 comments · Fixed by #775
Closed

source maps ignoring commented out lines #771

philippkuehn opened this issue Dec 26, 2014 · 5 comments · Fixed by #775

Comments

@philippkuehn
Copy link

Hey, i have a problem to get the source maps working.

@import "base/reset";

body {
  color: blue;
}

gives me for the body line 3 which is correct.

// @import "base/reset";

body {
  color: blue;
}

gives me for the body line 1 which is false.

It seems that all commented out lines are ignored in calculating the line numbers for the source map.

@philippkuehn
Copy link
Author

This seems not to be fixed. I have the same problem as before.
And there is something more. This is strange.

Testcase 1:

body {
  color: blue;
}

.banner {
  color: blue;
}

Chrome 39:

body: line 1 -> correct
.banner: line 2 -> not correct (should be 5)

Firefox 34:

body: line 1 -> correct
.banner: line 5 -> correct

Testcase 2:

// @import "base/reset";

body {
  color: blue;
}

.banner {
  color: blue;
}

Chrome 39:

body: line 1 -> not correct (should be 3)
.banner: line 4 -> not correct (should be 7)

Firefox 34:

body: line 1 -> not correct (should be 3)
.banner: line 7 -> correct

@xzyfer
Copy link
Contributor

xzyfer commented Dec 27, 2014

Are you testing against master? This patch has not made it into an official release yet.

@philippkuehn
Copy link
Author

yes. tested master.
(and i've updated my previous comment with more info)

@xzyfer xzyfer reopened this Dec 28, 2014
@am11
Copy link
Contributor

am11 commented Dec 30, 2014

#324 and #605 are related, which are being tackled by @mgreter's #603 and #786 PRs.
To recap, the root-cause of this issue is not as simple as it seems.

@mgreter
Copy link
Contributor

mgreter commented Jan 6, 2015

This issue should (hopefully) be addressed/fixed by #792.
Please try with latest master and open a new issue if the problem still exists.
Thank you!

@mgreter mgreter closed this as completed Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants