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

multiline paragraph get extra tabulation in formating

Open swirly opened this issue 1 year ago • 2 comments

What happens ?

Use a file with a paragraph on multiple lines format it using alt+shift+F

What is expected ?

Consistent formating and same formating on multiple alt+shift+F use

What happens ?

On each alt+shift+F use, subsequent lines in paragraphe get added space

Initial code

{% block cours %}
	<div class="cours">
		<p>
		  multiple line paragraph
                  with another line

*after one format

{% block cours %}
	<div class="cours">
		<p>
                   multiple line paragraph
                              with another line

*after two format

{% block cours %}
	<div class="cours">
		<p>
		  multiple line paragraph
                                        with another line

swirly avatar Feb 23 '24 12:02 swirly

To be more precise, it happens with other html tags, and it is made with tabs. If paragraph content is 3 tabs from beginning of line, each subsequent call to format will push second line (and subsequent lines also) 3 tabs away from line beginning. For 4 tabs, this is 4 tabs away, and so on.

swirly avatar Feb 23 '24 12:02 swirly

Same issue here, is there any update for this?

MangoMarcus avatar Apr 17 '24 11:04 MangoMarcus