File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ public function parseBlock($block)
412412 {
413413 $ this ->stack [] = $ block ;
414414 $ next = $ this ->get (0 );
415- if ($ next && $ next ->is ('( ' )) {
415+ if ($ next && $ next ->is ('( ' ) && !( $ block instanceof Main) ) {
416416 $ this ->skip ();
417417 $ block ->setValue ($ this ->parseParentheses ());
418418 }
Original file line number Diff line number Diff line change @@ -83,6 +83,16 @@ public function testCompileDollar()
8383 $ this ->assertSame ('isset($item) ? $item : \'\'; ' , $ actual );
8484 }
8585
86+ public function testDoubleParentheses ()
87+ {
88+ $ jsPhpize = new JsPhpize ();
89+ $ template = "(('is regular, javascript')) " ;
90+
91+ $ actual = trim ($ jsPhpize ->compile ($ template ));
92+
93+ $ this ->assertSame ($ template . '; ' , $ actual );
94+ }
95+
8696 /**
8797 * @expectedException \JsPhpize\Compiler\Exception
8898 * @expectedExceptionCode 1111111
You can’t perform that action at this time.
0 commit comments