Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
Format regex
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVanderbist committed Dec 8, 2019
1 parent 7eeb17c commit 3c730c9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,21 @@ protected function getAttributesFromAttributeString(string $attributeString): ar
{
$attributeString = $this->parseBindAttributes($attributeString);

$pattern = '/(?<attribute>[\w:-]+)(=(?<value>(\"[^\"]+\"|\\\'[^\\\']+\\\'|[^\s>]+)))?/';
$pattern = '/
(?<attribute>[\w:-]+)
(
=
(?<value>
(
\"[^\"]+\"
|
\\\'[^\\\']+\\\'
|
[^\s>]+
)
)
)?
/x';

if (! preg_match_all($pattern, $attributeString, $matches, PREG_SET_ORDER)) {
return [];
Expand Down

0 comments on commit 3c730c9

Please sign in to comment.