Closed exophunk closed 8 months ago
Thanks for the report (and for uploading the original file as an attachment) - I'll take a look at this this week and work on getting these issues resolved as soon as I can!
Resolved in the following versions:
antlers-formatter
: 1.2.10prettier-plugin-antlers
: 2.0.1wow that was fast! thank you very much for the fix! works perfectly
Describe the bug I've set up vscode-antlers-language-server as my default formatter for Antlers. I also have
formatOnSave
enabled. I keep running into issues with misformated code when doing something a bit more complicated, but the main issue is that the formatter sometimes removes large batches of code and I don't quite understand yet why.Example 1:
The following: The formatter sometimes just deletes parts of antlers code:
when formatting it is changed to:
the part
title.attributes.class
just gets deleted.Example 2 When commenting out template parts that contain antlers tags, the formatter just wipes all code below, basically makes it impossible to comment out template parts while developing.
This
is formatted to this:
The following just disappears! (and everything below)
Everything in my template file below the commented part just gets removed completely. Or sometimes only parts of it, breaking the html.
Impacted Products
Versions and Other Plugins/Extensions Antlers Toolbox v2.6.11
Configurations:
doesn't really matter though, same happens when using default settings
To Reproduce Use one of the expressions above and format file with antlers formatter
Expected behavior Should not delete code parts and should be able to handle comments
If submitting a formatting bug, please include the template contents below as well as an attachment details_sme.antlers.txt