less.js icon indicating copy to clipboard operation
less.js copied to clipboard

Master fix 3767 2

Open puckowski opened this issue 11 months ago • 0 comments

What:

This PR contains a proposed solution for https://github.com/less/less.js/issues/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
  • [x] Added/updated unit tests
  • [x] Code complete

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

puckowski avatar Dec 15 '24 12:12 puckowski