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

Error with sass files and ampersand #254

Closed
mlankenau opened this issue Feb 8, 2017 · 5 comments
Closed

Error with sass files and ampersand #254

mlankenau opened this issue Feb 8, 2017 · 5 comments

Comments

@mlankenau
Copy link

Hi there,

I am running into problem with source-map. It is used in brunch that is used in my elixir/phoenix project. The problem is about bootstrap_sass files. It fails with a mapping error when the ampersand syntax is being used. E.g.:

.blockquote-reverse,
blockquote.pull-right {
  padding-right: 15px;
  padding-left: 0;
  border-right: 5px solid $blockquote-border-color;
  border-left: 0;
  text-align: right;

  // Account for citation
  footer,
  small,
  .small {
    &:before { content: ''; }     // <<<<<=========== here I got the error
    &:after {
      content: '\00A0 \2014'; // nbsp, em dash
    }
  }
}

I am not the biggest Javascript dev, otherwise I would try to fix it on my own and provide a PR.

@HansTrashy
Copy link

I have encountered the same Problem, though it does work on one of the machines i tested it on.
The problem seems to be a negative column in the original file if an ampersand is used.

I did a really dirty fix by adding a return; before the validation checks in the SourceMapGenerator.prototype._validateMapping function in node_modules/source-map/lib/source-map-generator.js on the machine it did not work on.

@calebshay
Copy link

calebshay commented Feb 13, 2017

I just ran into this as well. Tracked it down to an issue with sass-brunch-2.10.2. Rolling back to sass-brunch-2.10.1 fixed it.

Others are having the same issue. brunch/sass-brunch#141

@hvalcourtSerdy
Copy link

hvalcourtSerdy commented May 15, 2017

It appears this may be related to sass/libsass#2312

@tromey
Copy link
Contributor

tromey commented Sep 22, 2017

My understanding from the above is that this is a bug in sass, so I'm closing this report.

@Nantris
Copy link

Nantris commented Sep 23, 2017

I'm not using SASS and I get this error when trying to use webpack obfuscator to obfuscate my javascript project.

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

No branches or pull requests

6 participants