microsoft / typescript-lit-html-plugin

TypeScript server plugin that adds intellisense for lit-html template strings
MIT License
255 stars 21 forks source link

On Format of nested tags: Overlapping ranges not allowed #12

Open mjbvz opened 6 years ago

mjbvz commented 6 years ago

Try running format on the following file:

const Nav = function() {
  return html`
    <h1>Sections</h1>
    <ul>
      ${repeat(items, i => i.id, (i, index) =>
        html`
          <li>
            ${index}: ${i.name}
          </li>
        `)}
    </ul>
  `;
}

In VSCode, see error about Overlapping ranges not allowed. This is caused by us trying to apply both sets of edits. The outer edits include a formatting for the inner placeholder which conflicts with the edits returned form the inner placeholder html section