Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master fix 3767 2 #4299

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Master fix 3767 2 #4299

wants to merge 3 commits into from

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