You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I generally use tabs for indentation. Prettier seems to incorrectly handle tabs in indentation of multi-line Antlers comments. Hopefully you can make out the whitespace indicators in these photos. The outcome is consistent no matter what the inpu these is the same on repeated formattings, and regardless of how the comment is indented before formatting, even when before formatting uses all spaces.
Before Formatting
After Formatting w/ Tabs
After Formatting w/ Space
Impacted Products
Which Antlers Toolbox products does this bug apply to?
Antlers Toolbox for VS Code
Formatter CLI
Antlers Prettier Plugin
Antlers Syntax Highlighting (external systems - not VS Code)
Expected behavior
I expect indentation to be handled the same as HTML comments.
comment brackets should move to the same level of indentation as the surrounding code
lines within the comment should indent and align relative to the comment depth
line breaks should be preserved (test case 3)
space characters should be replaced with tab characters
In the 1st and 3rd test it seems indentation via space is also indented incorrectly. I would expect tab characters to be replaced with the correct amount of spaces, not a single space.
If submitting a formatting bug, please include the template contents below as well as an attachment
<!-- Test Case 1 -->
{{#
@name Button
@param anchor
@param href Creates a link rather than a button
@param alt
@param slot:params
#}}
<!-- Test Case 2 -->
{{#
{{ user:profile field="username" :value="username" }}
{{ if no_results }}
{{ 404 }}
{{ /if }}
#}}
<!-- Test Case 3 -->
<div class="test">
<div class="">
{{# @todo Add career/skill tabs here #}}
{{#
2024.08.20 - Amet, sunt aliquip sit nisi duis pariatur culpa.
- Careers: Veniam elit aliquip est occaecat sed anim, esse.
- Skills: Duis qui aute laboris ad.
Amet esse nisi pariatur laboris.
Elit voluptate magna do cillum pariatur lorem. --!>
Labore sit minim reprehenderit duis labore ea, voluptate. -->
#}}
</div>
</div>
The text was updated successfully, but these errors were encountered:
Describe the bug
I generally use tabs for indentation. Prettier seems to incorrectly handle tabs in indentation of multi-line Antlers comments. Hopefully you can make out the whitespace indicators in these photos. The outcome is consistent no matter what the inpu these is the same on repeated formattings, and regardless of how the comment is indented before formatting, even when before formatting uses all spaces.
Impacted Products
Which Antlers Toolbox products does this bug apply to?
Versions and Other Plugins/Extensions
To Reproduce
Expected behavior
I expect indentation to be handled the same as HTML comments.
In the 1st and 3rd test it seems indentation via space is also indented incorrectly. I would expect tab characters to be replaced with the correct amount of spaces, not a single space.
If submitting a formatting bug, please include the template contents below as well as an attachment
The text was updated successfully, but these errors were encountered: