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 starting with //= moved to previous line #8684

Open
fabien-michel opened this Issue Sep 11, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@fabien-michel

fabien-michel commented Sep 11, 2018

v7 Regression

Describe the regression
A comment line starting with "//=" is moved at the end of the previous code line without comment
This is a problem for some process/macro relies on theses specifics comments lines to act.
This doesn't occur with pre 7 version of babel

Input Code

var toto = 1;
//= my comment

var truc="bidule";
// my comment

Compile to :

var toto = 1; //= my comment

var truc="bidule";
// my comment

Babel Configuration (.babelrc, package.json, cli command)

{
  { compact: false, presets: ["@babel/env"] }
}

Expected behavior/code

var toto = 1;
//= my comment

var truc="bidule";
// my comment

Environment

  • Babel version(s): v7.0.0
  • Node/npm version: Node 7
@babel-bot

This comment has been minimized.

Show comment
Hide comment
@babel-bot

babel-bot Sep 11, 2018

Collaborator

Hey @fabien-michel! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

Collaborator

babel-bot commented Sep 11, 2018

Hey @fabien-michel! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@loganfsmyth

This comment has been minimized.

Show comment
Hide comment
@loganfsmyth

loganfsmyth Sep 12, 2018

Member

Weird. It's certainly strange, and I'm happy to leave this in case someone wants to look into it. That said, Babel hasn't generally made much of a guarantee about comment placement, so this is likely going to be a low priority.

Member

loganfsmyth commented Sep 12, 2018

Weird. It's certainly strange, and I'm happy to leave this in case someone wants to look into it. That said, Babel hasn't generally made much of a guarantee about comment placement, so this is likely going to be a low priority.

@fabien-michel

This comment has been minimized.

Show comment
Hide comment
@fabien-michel

fabien-michel Sep 12, 2018

I can have a look into the code, just if someone can spot me the part where the problem most probably occur.

fabien-michel commented Sep 12, 2018

I can have a look into the code, just if someone can spot me the part where the problem most probably occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment