当我格式化文档时,而不是保持原来的制表结构:
<div class="topbar">
<div class="topbar-wrapper">
<div class="js-topbar-dialog-corral">
<div class="topbar-dialog siteSwitcher-dialog dno">
</div>
</div>
</div>
</div>
IDEA 打破了它:
如何关闭这种行为?
最佳答案
查看代码样式、Html 下的设置,然后在“其他”选项卡下:
您应该检查 Do not indent children of:
条目。你可能想玩这些东西,直到你得到你想要的风格。如果仍然无法正常工作,那么可能您的文档不符合 xhtml 标准——也就是说,它可能不平衡,虽然是合法的 html,但 Idea 难以格式化。
https://stackoverflow.com/questions/23289499/