简体   繁体   中英

VS Code HTML formatting wrong

I have a HTML file where the formatting is completely messed up. Hopefully you can the the problem in this picture below:

在此输入图像描述

This is just an example from the file (other parts are messed up too). You can see that the <table> start tag and end tag don't have the same indentation. Also, I would expect everything inside the tag to be indented farther. This is how it looks after using the Shift + Alt + F code formatting shortcut. What could the problem be and how can I solve it?

I had the same problem! I opened a issue in vscode's github https://github.com/microsoft/vscode/issues/74139#issuecomment-495578264 . The older versions used to work I just got it solved rolling back to the version 1.17...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM