Closed karreiro closed 1 year ago
This PR introduces support to broken templates in the Liquid parser. In other words, this PR makes this unit pass:
it('should parse unclosed tables with assignments', () => { ast = toLiquidAST(` {%- liquid assign var1 = product -%} <table> {% tablerow var2 in collections.first.products %} {% assign var3 = var2 %} {{ var3.title }} `); expectPath(ast, 'children.0.type').to.eql('LiquidTag'); expectPath(ast, 'children.0.name').to.eql('liquid'); expectPath(ast, 'children.0.markup.0.type').to.eql('LiquidTag'); expectPath(ast, 'children.0.markup.0.name').to.eql('assign'); expectPath(ast, 'children.0.markup.0.markup.name').to.eql('var1'); expectPath(ast, 'children.1.type').to.eql('TextNode'); expectPath(ast, 'children.1.value').to.eql('<table>'); expectPath(ast, 'children.2.type').to.eql('LiquidTag'); expectPath(ast, 'children.2.name').to.eql('tablerow'); });
This PR introduces support to broken templates in the Liquid parser. In other words, this PR makes this unit pass: