mblode/vscode-twig-language

Formatting wrap text will result in infinite indentation and auto-add double quotes for value

Closed this issue · 1 comments

1aron commented

Before formatting

螢幕快照 2019-04-13 上午1 37 05

After formatting

螢幕快照 2019-04-13 上午1 37 21

Two problems:

  1. The wrap text would indent Infinitely.
  2. Shouldn't add double quotes for value automatically. class=p
    ( This should be a personal habit. )

The following code give you to test:

<div class="p">
    <h4>Market — your business
        {{ i + 1 }}</h4>
    <p class="mt-sm">
        Take the guesswork out of marketing with 
        built-in tools that help you create, execute,
        and analyze campaigns on Facebook and Google.
    </p>
</div>

You could set the wrap to 40 characters and have no issues. Otherwise, the formatter doesn't respond well to enter keys/line breaks in paragraphs of text