Closed johncarter- closed 1 year ago
Thanks for the report! I will look into this and get a fix out sometime soon (and make it easier to select which product/version is impacted). 🙂
Would you be able to share more of the template causing the issue? I am not able to reproduce with the provided sample using the VS Code formatter, or the prettier extension.
Thanks!
Thanks for that! I was able to track down the issue - I will be working on making sure it doesn't trash thing when there is invalid Antlers.
However, in your template you have this:
{{ author_articles = collection:articles author:is="{author:id}" id:isnt="{id}" limit="3" }}
To assign the tag results to a variable you will need to wrap that in {}
:
{{ author_articles = {collection:articles author:is="{author:id}" id:isnt="{id}" limit="3"} }}
That will correct the assignment behavior, as well as resolve the formatting bug 👍
Thank you so much John. You're a genuine legend.
The original buggy behavior has been resolved in:
2.5.1
antlers-language-server
(NPM): 1.2.1
antlers-formatter
(NPM): 1.2.1
prettier-plugin-antlers
(NPM): 1.2.1
Describe the bug Formatting this chunk:
Results in this oddity:
I'm probably doing something weird with Antlers to make it happen.
Impacted Products Which Antlers Toolbox products does this bug apply to?
I don't understand the difference 🤔
Versions and Other Plugins/Extensions Please include the product version you are reporting a bug for. If you are reporting a bug for products such as Antlers Toolbox for VS Code or the Antlers Prettier Plugin, please include a list of other configured extensions or plugins if you believe they are contributing to the problematic behavior.
To Reproduce Format the above code block
Expected behavior The
object-position
andsrc
to not be replaced with random strings.If submitting a formatting bug, please include the template contents below as well as an attachment Add any problematic templates here.
Additional context N/A