Skip to content

Commit ebb8e52

Browse files
committed
Found a few more
1 parent 960538a commit ebb8e52

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

liquid/builtin/tags/decrement_tag.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ def parse(self, stream: TokenStream) -> DecrementNode:
6363
tok=tok,
6464
identifier=str(
6565
parse_unchained_identifier(
66-
ExprTokenStream(tokenize(stream.current.value))
66+
ExprTokenStream(
67+
tokenize(stream.current.value, stream.current.linenum)
68+
)
6769
)
6870
),
6971
)

liquid/builtin/tags/increment_tag.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def parse(self, stream: TokenStream) -> IncrementNode:
5959
tok=tok,
6060
identifier=str(
6161
parse_unchained_identifier(
62-
ExprTokenStream(tokenize(stream.current.value))
62+
ExprTokenStream(
63+
tokenize(stream.current.value, stream.current.linenum)
64+
)
6365
)
6466
),
6567
)

liquid/builtin/tags/render_tag.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Parse tree node and tag definition for the built in "render" tag."""
2+
23
import sys
34
from typing import Dict
45
from typing import List
@@ -249,7 +250,9 @@ class RenderTag(Tag):
249250
def parse(self, stream: TokenStream) -> Node:
250251
tok = next(stream)
251252
expect(stream, TOKEN_EXPRESSION)
252-
expr_stream = ExprTokenStream(tokenize(stream.current.value))
253+
expr_stream = ExprTokenStream(
254+
tokenize(stream.current.value, stream.current.linenum)
255+
)
253256

254257
# Need a string. 'render' does not accept identifiers that resolve to a string.
255258
# This is the name of the template to be included.

liquid/extra/tags/if_not.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ class IfNotTag(IfTag):
2020
def parse_expression(self, stream: TokenStream) -> Expression:
2121
"""Pare a boolean expression from a stream of tokens."""
2222
expect(stream, TOKEN_EXPRESSION)
23-
return parse_boolean_expression_with_parens(stream.current.value)
23+
return parse_boolean_expression_with_parens(
24+
stream.current.value, stream.current.linenum
25+
)

0 commit comments

Comments
 (0)