Skip to content

Lessc to provide preserve comments option #4269

Open
@dkaushik95

Description

@dkaushik95

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions