Closed amit777 closed 1 year ago
This is related to a bigger topic about linters/formatters/AST explorers for Liquid template syntax.
In short, currently templates are parsed into internal objects, and the internal structure for tags attributes is defined by each tag. Thus we don't have a universal way to stringify parsed objects.
Let's move to this topic: #528, closing this issue.
Is it possible to stringify a parsed template back to the template string? I'm not looking to render the template with data. I'm looking to validate and format the liquid tags. So if someone enters
{% if foo=="bar" %}FOO{% endif %}
I want it to put spaces around the==
or cleanup other spacing stuff within the liquid tags.