File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function getNodelist()
52
52
public function parse (array &$ tokens )
53
53
{
54
54
$ startRegexp = new Regexp ('/^ ' . Liquid::get ('TAG_START ' ) . '/ ' );
55
- $ tagRegexp = new Regexp ('/^ ' . Liquid::get ('TAG_START ' ) . Liquid::get ('WHITESPACE_CONTROL ' ) . '?\s*(\w+)\s*(.*?) ' . Liquid::get ('WHITESPACE_CONTROL ' ) . '? ' . Liquid::get ('TAG_END ' ) . '$/ ' );
55
+ $ tagRegexp = new Regexp ('/^ ' . Liquid::get ('TAG_START ' ) . Liquid::get ('WHITESPACE_CONTROL ' ) . '?\s*(\w+)\s*(.*?) ' . Liquid::get ('WHITESPACE_CONTROL ' ) . '? ' . Liquid::get ('TAG_END ' ) . '$/s ' );
56
56
$ variableStartRegexp = new Regexp ('/^ ' . Liquid::get ('VARIABLE_START ' ) . '/ ' );
57
57
58
58
$ this ->nodelist = array ();
Original file line number Diff line number Diff line change @@ -232,6 +232,14 @@ public function testSyntaxErrorNotClosed()
232
232
$ this ->assertTemplateResult ('' , '{% if jerry == 1 %} ' );
233
233
}
234
234
235
+ public function testSyntaxErrorNotClosedLineBreak ()
236
+ {
237
+ $ this ->expectException (\Liquid \Exception \ParseException::class);
238
+ $ this ->expectExceptionMessage ('if tag was never closed ' );
239
+
240
+ $ this ->assertTemplateResult ('' , "{% if jerry \n == 1 %} " );
241
+ }
242
+
235
243
/**
236
244
*/
237
245
public function testSyntaxErrorEnd ()
You can’t perform that action at this time.
0 commit comments