fix: case should allow multiple values separated by or

This is supported by Shopify liquid.
This commit is contained in:
Francisco Soto
2023-08-19 23:52:24 +08:00
committed by Jun Yang
parent 4c30c660ae
commit b8e7e2d946
2 changed files with 22 additions and 1 deletions
+6 -1
View File
@@ -17,7 +17,12 @@ export default class extends Tag {
const values: ValueToken[] = []
while (!token.tokenizer.end()) {
values.push(token.tokenizer.readValueOrThrow())
token.tokenizer.readTo(',')
token.tokenizer.skipBlank()
if (token.tokenizer.peek() === ',') {
token.tokenizer.readTo(',')
} else {
token.tokenizer.readTo('or')
}
}
this.branches.push({
values,