-
Notifications
You must be signed in to change notification settings - Fork 70
Description
The @shopify/liquid-html-parser package throws LiquidHTMLSyntaxError for the following code:
<{% if true %}div{% endif %}></{% if true %}div{% endif %}>Full error:
SyntaxError: expected a letter, "{{", "wbr" (case-insensitive), "track" (case-insensitive), "source" (case-insensitive), "param" (case-insensitive), "meta" (case-insensitive), "link" (case-insensitive), "keygen" (case-insensitive), "input" (case-insensitive), "img" (case-insensitive), "hr" (case-insensitive), "embed" (case-insensitive), "command" (case-insensitive), "col" (case-insensitive), "br" (case-insensitive), "base" (case-insensitive), "area" (case-insensitive), "svg", "style", or "script"
I'd expect this syntax to be supported rather than throwing an error.
This syntax existed in older versions of the Dawn theme (example), although the theme has now been changed to work around it. This is how the issue presents in the theme editor:
Reproducible with:
- Shopify theme editor
- Programmatic use of @shopify/liquid-html-parser