Skip to content

Use a custom tokenizer for Less - #226

Merged
fisker merged 11 commits into
nextfrom
copilot/less-custom-tokenizer
Nov 25, 2026
Merged

fisker merged 11 commits into
nextfrom
copilot/less-custom-tokenizer

Conversation

@fisker

@fisker fisker commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Fixes #224
Fixes #172
Closes #225

Summary

  • Add a PostCSS-based custom tokenizer with marked SCSS-style patches for Less inline comments.
  • Handle inline comment tokens directly so parsing keeps original source positions and inputs.
  • Preserve raw variable formatting, including inline comments, while supporting edits.
  • Add regression coverage for comment source offsets and variable value round-tripping.

Validation

  • node .yarn/releases/yarn-4.18.1.cjs test (376 passed, 2 skipped)
  • node .yarn/releases/yarn-4.18.1.cjs lint

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/postcss-less@226

commit: 3f35dff

@fisker
fisker force-pushed the copilot/less-custom-tokenizer branch from 0208768 to 2ead9d6 Compare November 25, 2026 05:47
@fisker
fisker marked this pull request as ready for review November 25, 2026 05:52
fisker and others added 6 commits November 25, 2026 07:01
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@fisker
fisker changed the base branch from main to next November 25, 2026 11:22
@fisker
fisker merged commit 29b4ecd into next Nov 25, 2026
8 checks passed
@fisker
fisker deleted the copilot/less-custom-tokenizer branch November 25, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't parse comments with quote in selector CssSyntaxError when a single quote is present in a comment inside a value

1 participant