You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tag "endif" not found, file:/Sites/debug.liquid, line:4, col:1
2| {%- if file != blank -%}
3| {%- debug file -%}
>> 4| {%- endif -%}
^
ParseError: tag "endif" not found, file:/Users/westurner/Sites/humanscale/scripts/erp/debug.liquid, line:4, col:1
Intent and Progress:
This debug function should be simple—take the variable in the tag and output it in console or a log file. That's working as expected. However, because there's no "end tag" it seems like context of the tag is getting confused. If I remove the if condition or put the condition somewhere else, the tag works perfectly. If I remove the stream from starting, then it also doesn't throw an error, but the render function never runs. Ultimately nothing needs to render with this function, but something needs to happen, and it needs to be inside of a condition.
I was reviewing the "assign" tag from source and really tried replicating a similar definition because there is no end tag as well. I keep running into this parse error where "endif" is not found, but it's clearly there. So my assumption is that the parser is getting confused and not closing out properly. My assumption was that if I .stop() the stream it would signal the tag is closed. Is there something else I need to call to close it out?
The text was updated successfully, but these errors were encountered:
Hey @harttle - I was working on a tag to support a custom tag, and I'm running into a ParseError.
Here's the very basic filter:
The liquid code is also simple, and works as expected with this filter:
However when a condition wraps this "function" it doesn't work and breaks:
And the error looks like this:
Intent and Progress:
This debug function should be simple—take the variable in the tag and output it in console or a log file. That's working as expected. However, because there's no "end tag" it seems like context of the tag is getting confused. If I remove the
if
condition or put the condition somewhere else, the tag works perfectly. If I remove thestream
from starting, then it also doesn't throw an error, but the render function never runs. Ultimately nothing needs to render with this function, but something needs to happen, and it needs to be inside of a condition.I was reviewing the "assign" tag from source and really tried replicating a similar definition because there is no end tag as well. I keep running into this parse error where "endif" is not found, but it's clearly there. So my assumption is that the parser is getting confused and not closing out properly. My assumption was that if I
.stop()
the stream it would signal the tag is closed. Is there something else I need to call to close it out?The text was updated successfully, but these errors were encountered: