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

Comments still being converted from double-slash to star-slash #92

Closed
jhildenbiddle opened this issue Aug 2, 2017 · 3 comments
Closed
Assignees
Labels

Comments

@jhildenbiddle
Copy link

Re-opening issue originally discussed in #91.

Unfortunately, this does not appear to be resolved.

  • I have disabled all VSCode extensions except for Autoprefixer
  • I have upgraded the Autoprefixer extension to 2.1.1
  • I have tried using an external version of autoprefixer by installing it via NPM and setting autoprefixer.findExternalAutoprefixer to true in VSCode
  • I have verified that the issue is not related to autoprefixer by comparing the output of the extension and postcss-cli + autoprefixer

SCSS:

// Comment
body {
    display: flex;
    // color: #000;
}

Processed using postcss-cli and autoprefixer:

// Comment
body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    // color: #000;
}

VSCode with Autoprefixer plugin (2.0.0 & 2.1.1):

/* Comment*/

body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    /* color: #000;*/
}

This also breaks SASSDoc "triple-slash" comments (again, no issue using postcss-cli + autoprefixer).

Before:

/// Comment
body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    /// color: #000;
}

After

/*/ Comment*/
body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    /*/ color: #000;*/
}

My hunch is that the postcss-safe-parser plugin used by your extension is the issue, fixing what it sees as invalid CSS comments ("//" and "///") and converting them to valid CSS comments. That makes sense when compiling to CSS, but not when autoprefixing LESS, Stylus, or SASS/SCSS code in an editor.

Thanks again for taking a look at this!

@mrmlnc mrmlnc self-assigned this Aug 8, 2017
@mrmlnc mrmlnc added the bug label Aug 8, 2017
@mrmlnc
Copy link
Owner

mrmlnc commented Aug 8, 2017

Please, don't worry. I was on vacation without access to the internet ☺️

@mrmlnc mrmlnc closed this as completed in eb38485 Aug 8, 2017
@mrmlnc
Copy link
Owner

mrmlnc commented Aug 8, 2017

Well, now must be solved by 2.1.2.

@jhildenbiddle
Copy link
Author

All set! Thanks for taking care of this, @mrmlnc !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants