Skip to content

Commit

Permalink
Remove superfluous alternation from the QUOTED_FRAGMENT regex (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
live627 authored Feb 12, 2023
1 parent befadb5 commit d9c1629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Liquid/Liquid.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static function get($key)
// This case is needed for compound settings
switch ($key) {
case 'QUOTED_FRAGMENT':
return '(?:' . self::get('QUOTED_STRING') . '|(?:[^\s,\|\'"]|' . self::get('QUOTED_STRING') . ')+)';
return '(?:' . self::get('QUOTED_STRING') . '|[^\s,\|\'"]+)';
case 'TAG_ATTRIBUTES':
return '/(\w+)\s*\:\s*(' . self::get('QUOTED_FRAGMENT') . ')/';
case 'TOKENIZATION_REGEXP':
Expand Down

0 comments on commit d9c1629

Please sign in to comment.