Skip to content

Commit

Permalink
update Less_Parser::parseEntitiesKeyword() to support some Less.js 3.…
Browse files Browse the repository at this point in the history
…13 behaviours

* Grid syntax (less/less.js#3092)
* Escapes in keywords (less/less.js#3268)

Bug: T288498
Change-Id: I3867cee77ad2a69ecb8e4f850fa5c548e3520b40
  • Loading branch information
dringsim committed May 27, 2024
1 parent 8de313a commit db238f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Less/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,8 @@ private function parseEntitiesQuoted() {
* @return Less_Tree_Keyword|Less_Tree_Color|null
*/
private function parseEntitiesKeyword() {
// $k = $this->matchReg('/\\G[_A-Za-z-][_A-Za-z0-9-]*/');
$k = $this->matchReg( '/\\G%|\\G[_A-Za-z-][_A-Za-z0-9-]*/' );
// $k = $this->matchReg('/\\G\\[?(?:[\\w-]|\\\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+\\]?/');
$k = $this->matchReg( '/\\G%|\\G\\[?(?:[\\w-]|\\\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+\\]?/' );
if ( $k ) {
$color = Less_Tree_Color::fromKeyword( $k );
if ( $color ) {
Expand Down
1 change: 0 additions & 1 deletion test/phpunit/FixturesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class phpunit_FixturesTest extends phpunit_bootstrap {
'merge' => true,
'css-3' => true,
'colors' => true,
'css-grid' => true,
'urls' => true,
'operations' => true,
'import-remote' => true,
Expand Down

0 comments on commit db238f0

Please sign in to comment.