Skip to content

Commit

Permalink
fix(grammar): allow unmatched }} and %} as valid liquid
Browse files Browse the repository at this point in the history
Fixes #320
  • Loading branch information
Goncalerta committed Jan 21, 2019
1 parent 3b2b5fc commit 1889c7b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion liquid-compiler/src/grammar.pest
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Expression = { ExpressionStart ~ WHITESPACE* ~ ExpressionInner ~ WHITESPACE* ~ E
// Not allowing Tag/Expression Start/End might become a problem
// for {% raw %}, {% comment %} and other blocks that don't parse
// the elements inside with liquid: unclosed delimiters won't be accepted
Raw = @{ (!(TagStart | ExpressionStart | TagEnd | ExpressionEnd) ~ ANY)+ }
Raw = @{ (!(TagStart | ExpressionStart) ~ ANY)+ }


// Inner parsing
Expand Down
1 change: 0 additions & 1 deletion tests/conformance_ruby/tags/raw_tag_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ fn test_output_in_raw() {
}

#[test]
#[should_panic] // liquid-ignore#277
fn test_open_tag_in_raw() {
assert_template_result!(
" Foobar {% invalid ",
Expand Down

0 comments on commit 1889c7b

Please sign in to comment.