mblode/vscode-twig-language-2

Formatter pushes comments to the right

barsan-md opened this issue · 5 comments

Create a twig file containing a comment block

{#
    <div></div>
#}

Format the document.
The result is:

{#
        <div></div>
    #}

Keep formatting and the comment is progressively being pushed to the right.

This is happening to me and several of my coworkers as well.
version 0.9.0

This is making me insane! It adds an additional tab every time the file is saved/formatted.

There are other weird edge cases regarding comment formatting also. It forces the last html tag immediately before any twig comment to break to an new line after the tag name. HTML comments behave the same.

I am having the same issue.