Visual Studio Code: How to automatically format HTML contained in template literals?

Viewed 142

In my Javascript code I have many template literals that contain HTML code. These blocks are correctly highlighted via es6-string-html. However, they are not formatted automatically, which means the following block will be left as is:

let html = `
      <div class="wrapper">
<div>Hello, world!
     </div>
                 </div>
      `;

How can I enable auto-formatting for these strings as well?

0 Answers
Related