Skip to content

Commit

Permalink
Merge remote-tracking branch 'kohlschuetter/ck/LiquidParserMatchEmpty…
Browse files Browse the repository at this point in the history
…String' into feature/single_config
  • Loading branch information
msangel committed Jul 29, 2023
2 parents 2d65a3b + edc1d9d commit 5ee8191
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/antlr4/liquid/parser/v4/LiquidParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ jekyll_include_params
;

output
: {evaluateInOutputTag}? outStart evaluate=expr filter* OutEnd
: {isEvaluateInOutputTag()}? outStart evaluate=expr filter* OutEnd
| {isStrict()}? outStart term filter* OutEnd
| {isWarn() || isLax()}? outStart term filter* unparsed=not_out_end? OutEnd
;

not_out_end
: ~( OutEnd )*
: ( ~OutEnd )+
;

filter
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/liqp/parser/v4/LiquidParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ public void testOutput() {

assertThat(
texts("{{ true }}", "output"),
equalTo(array("{{", "true", "", "}}"))
equalTo(array("{{", "true", "}}"))
);

assertThat(
texts("{{ 'some string here' | uppercase }}", "output"),
equalTo(array("{{", "'some string here'", "|uppercase", "", "}}"))
equalTo(array("{{", "'some string here'", "|uppercase", "}}"))
);
}

Expand Down

0 comments on commit 5ee8191

Please sign in to comment.