Garbled contents of {{# format-ignore-* #}} when inside a loop
Closed this issue · 3 comments
petemolinero commented
Describe the bug
When I try to ignore formatting on a section inside a loop, it results in garbled output:
{{ myvar }}
{{# format-ignore-start #}}
{{ partial:mytemplate }}
{{# format-ignore-end #}}
{{ /myvar }}
When I run the antlers formatter, it creates this:
{{ myvars }}
<aecm3hp7xneacrwla />
{{ /myvars }}
Impacted Products
Which Antlers Toolbox products does this bug apply to?
- Antlers Toolbox for VS Code
- Formatter CLI (untested)
- Antlers Prettier Plugin
- Antlers Syntax Highlighting (external systems - not VS Code)
Versions and Other Plugins/Extensions
- VS Code 1.89.1
- Antlers Toolbox v2.6.15
- prettier-plugin-antlers v2.0.2
To Reproduce
- Enter the following into an
antlers.html
file
{{ myvar }}
{{# format-ignore-start #}}
{{ partial:mytemplate }}
{{# format-ignore-end #}}
{{ /myvar }}
- Run prettier with the antlers plugin
- It garbles the output
Expected behavior
It should simply ignore formatting within the ignore tags.
JohnathonKoster commented
Thanks for the report!
JohnathonKoster commented
Resolved in the following versions:
- Antlers Toolbox for VS Code: 2.6.16
antlers-language-server
: 1.3.12prettier-plugin-antlers
: 2.0.3antlers-formatter
: 1.2.12
petemolinero commented
Wow, so fast, thank you!!