less.js icon indicating copy to clipboard operation
less.js copied to clipboard

Comments misplaced

Open cipchk opened this issue 5 years ago • 1 comments

Less.js Version: 3.11.1

/** a */
.modal {
  /** b */
  &-header {
    font-size: 12px;
  }
  /** c */
  &-title {
    font-size: 12px;
  }

Output:

/** a */
.modal {
  font-size: 12px;
  /** b */
  /** c */
}
.modal-header {
  font-size: 12px;
}
.modal-title {
  font-size: 12px;
}

I think it should output:

/** a */
.modal {
  font-size: 12px;
}
/** b */
.modal-header {
  font-size: 12px;
}
/** c */
.modal-title {
  font-size: 12px;
}

cipchk avatar Jun 02 '20 12:06 cipchk

You're not wrong that that's ideal, but it would take refactoring of parsing and serialization (flattening) of rules

matthew-dean avatar Jun 22 '20 14:06 matthew-dean