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
123123 private function consumeComponentName (string $ customExceptionMessage = null ): string
124124 {
125125 $ 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 ])) {
127127 ++$ this ->position ;
128128 }
129129
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ public function getLexTests(): iterable
6262 '{{ component( \'foo \', { bar: true }) }} ' ,
6363 ];
6464
65+ yield 'attribute_with_no_value_and_no_attributes ' => [
66+ '<twig:foo/> ' ,
67+ '{{ component( \'foo \') }} ' ,
68+ ];
69+
6570 yield 'component_with_default_block_content ' => [
6671 '<twig:foo>Foo</twig:foo> ' ,
6772 '{% component \'foo \' %}{% block content %}Foo{% endblock %}{% endcomponent %} ' ,
@@ -83,10 +88,6 @@ public function getLexTests(): iterable
8388 '<twig:foo-bar></twig:foo-bar> ' ,
8489 '{% component \'foo-bar \' %}{% endcomponent %} ' ,
8590 ];
86- yield 'component_with_character_/_on_his_name ' => [
87- '<twig:foo/bar></twig:foo/bar> ' ,
88- '{% component \'foo/bar \' %}{% endcomponent %} ' ,
89- ];
9091 yield 'component_with_character_._on_his_name ' => [
9192 '<twig:foo.bar></twig:foo.bar> ' ,
9293 '{% component \'foo.bar \' %}{% endcomponent %} ' ,
You can’t perform that action at this time.
0 commit comments