vscode-twig-language-2 icon indicating copy to clipboard operation
vscode-twig-language-2 copied to clipboard

Formatter pushes comments to the right

Open barsan-md opened this issue 5 years ago • 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.

barsan-md avatar Nov 25 '19 07:11 barsan-md

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

spoeken avatar Jan 31 '20 12:01 spoeken

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.

montemartin avatar Mar 24 '20 21:03 montemartin

I am having the same issue.

the-sides avatar Jul 10 '21 23:07 the-sides

no solution ?

zine-eddine27 avatar Dec 12 '23 13:12 zine-eddine27

Same. How does this not have a solution by now?

erichhaemmerle avatar Mar 12 '24 20:03 erichhaemmerle