We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e819a4b commit d1c09eeCopy full SHA for d1c09ee
2 files changed
src/View/Antlers/Language/Parser/DocumentParser.php
@@ -944,6 +944,7 @@ private function scanToEndOfDirective()
944
$this->nodes[] = $node;
945
$this->lastAntlersNode = $node;
946
$this->startIndex = $this->currentIndex;
947
+ $this->currentIndex += 1;
948
}
949
950
private function advanceWhitespace()
tests/Antlers/Parser/DirectivesTest.php
@@ -34,4 +34,23 @@ public function test_directives_args_must_be_finished()
34
35
$this->renderString('@props ("this isnt()", "done!"');
36
37
+
38
+ public function test_directives_dont_leave_extra_parenthesis()
39
+ {
40
+ $template = <<<'EOT'
41
+@props([
42
43
+])a
44
45
+Hellow
46
+EOT;
47
48
+ $expected = <<<'EOT'
49
+a
50
51
52
53
54
+ $this->assertSame($expected, $this->renderString($template));
55
+ }
56
0 commit comments