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

Lessc to provide preserve comments option

Open dkaushik95 opened this issue 9 months ago • 0 comments

lessc should provide an option for comments to be preserved. Currently it preserves block comments and removes inline or // comments.

To reproduce:

// Main comment
/** comment with block **/
body {
  width: 100%; // inline comment
}

Current behavior:

/** comment with block **/
body {
  width: 100%;
}

Expected behavior:

/** Main comment **/
/** comment with block **/
body {
  width: 100%; /** inline comment **/
}

Environment information:

  • less version: v4.2.0
  • nodejs version: v18.18.0
  • operating system: macos

dkaushik95 avatar May 03 '24 19:05 dkaushik95