File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
tests/Fixtures/templates/tags Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 2121 * @internal
2222 *
2323 * thanks to @giorgiopogliani for the inspiration on this lexer <3
24+ *
2425 * @see https://github.com/giorgiopogliani/twig-components
2526 */
2627class ComponentLexer extends Lexer
2728{
28- public const ATTRIBUTES_REGEX = '(?<attributes>(?:\s+[\w\-:.@]+(=(?: \\ \ "[^\\ \ "]*\\ \ "| \'[^ \']* \'|[^ \'\\\"=<>]+))?)*\s*) ' ;
29+ public const ATTRIBUTES_REGEX = '(?<attributes>(?:\s+[\w\-:.@]+(=(?:"[^"]*"| \'[^ \']* \'|[^ \'\\\"=<>]+))?)*\s*) ' ;
2930 public const OPEN_TAGS_REGEX = '/<\s*t:(?<name>([[\w\-\:\.]+))\s* ' .self ::ATTRIBUTES_REGEX .'(\s?)+>/ ' ;
3031 public const CLOSE_TAGS_REGEX = '/<\/\s*t:([\w\-\:\.]+)\s*>/ ' ;
3132 public const SELF_CLOSE_TAGS_REGEX = '/<\s*t:(?<name>([\w\-\:\.]+))\s* ' .self ::ATTRIBUTES_REGEX .'(\s?)+\/>/ ' ;
Original file line number Diff line number Diff line change 1- <t:component _a propA propB =' hello' >
1+ <t:component _a propA propB =" hello" >
22</t:component _a>
You can’t perform that action at this time.
0 commit comments