prettier-plugin-liquid
prettier-plugin-liquid copied to clipboard
Issue formatting attributes
Describe the bug
When formatting the content of a class attribute, extra characters are added to the liquid tag and the closing }}
is removed.
Unformatted source
<body class="template-{{ template.name }}" data-instant-allow-query-string {% if settings.reduce_animations %}data-reduce-animations{% endif %}>
Expected output
<body
class="template-{{ template.name }}"
data-instant-allow-query-string
{% if settings.reduce_animations %}
data-reduce-animations
{% endif %}
>
Actual output
<body
class="template-{{ template.nnamee "
data-instant-allow-query-string
{% if settings.reduce_animations %}
data-reduce-animations
{% endif %}
>
Debugging information
- OS: Mac
- Version: 12.6
Additional context
Screenshot of error diff:
The issue can be fixed by adding {% # prettier-ignore-attributes %}
above the element.