Skip to content

Conversation

@vardhan30016
Copy link

Summary

This PR fixes an issue where inline comments inside nested selectors were lost during parsing.

Changes

  • Updated packages/less/src/less/parser/parser.js to correctly capture and preserve inline comments.
  • Added test coverage to confirm that inline comments remain in the compiled output.

Testing

  • Ran pnpm grunt test locally — all tests passed.
  • Verified that nested selectors with inline comments retain comment text in compiled CSS.

Why this matters

Preserving inline comments improves readability in complex Less projects and maintains developer context when recompiled.


Contributor: @vardhan30016 (Vardhan Naidu)

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant