Skip to content

Conversation

puckowski
Copy link
Contributor

What:

This PR contains a proposed solution for #3767

Variable values with periods were working in Less.js version 3.0.4 but no longer worked as of version 3.5.0 due to a strict regex on variable values.

Instead of trying to automatically wrap Less.js CLI global variables in quotes to circumvent this issue (not sure if that would break anyone's flow), I decided to tweak to regex logic to allow periods in variable values under certain conditions.

Why:

With the fix, Less.js CLI and browser based flows become more flexible.

Checklist:

  • Documentation
  • Added/updated unit tests
  • Code complete

The tests are a bit esoteric but are intended to show the new logic works correctly without breaking any existing test.

* Fix issue with variable values with periods when unquoted by single or
  double quotes.
* Add more variable tests for issue less#3767.
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 15, 2024
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