File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ public function preLexComponents(string $input): string
123
123
private function consumeComponentName (string $ customExceptionMessage = null ): string
124
124
{
125
125
$ start = $ this ->position ;
126
- while ($ this ->position < $ this ->length && preg_match ('/[A-Za-z0-9_:@\-\/ .]/ ' , $ this ->input [$ this ->position ])) {
126
+ while ($ this ->position < $ this ->length && preg_match ('/[A-Za-z0-9_:@\-.]/ ' , $ this ->input [$ this ->position ])) {
127
127
++$ this ->position ;
128
128
}
129
129
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ public function getLexTests(): iterable
62
62
'{{ component( \'foo \', { bar: true }) }} ' ,
63
63
];
64
64
65
+ yield 'attribute_with_no_value_and_no_attributes ' => [
66
+ '<twig:foo/> ' ,
67
+ '{{ component( \'foo \') }} ' ,
68
+ ];
69
+
65
70
yield 'component_with_default_block_content ' => [
66
71
'<twig:foo>Foo</twig:foo> ' ,
67
72
'{% component \'foo \' %}{% block content %}Foo{% endblock %}{% endcomponent %} ' ,
@@ -83,10 +88,6 @@ public function getLexTests(): iterable
83
88
'<twig:foo-bar></twig:foo-bar> ' ,
84
89
'{% component \'foo-bar \' %}{% endcomponent %} ' ,
85
90
];
86
- yield 'component_with_character_/_on_his_name ' => [
87
- '<twig:foo/bar></twig:foo/bar> ' ,
88
- '{% component \'foo/bar \' %}{% endcomponent %} ' ,
89
- ];
90
91
yield 'component_with_character_._on_his_name ' => [
91
92
'<twig:foo.bar></twig:foo.bar> ' ,
92
93
'{% component \'foo.bar \' %}{% endcomponent %} ' ,
You can’t perform that action at this time.
0 commit comments