Why doesn't Visual Studio code formatting work properly for Razor markup?

后端 未结 10 1616
醉梦人生
醉梦人生 2020-12-08 13:04

Or, should I rather ask, when will VS code formatting work properly for Razor markup? The formatting works for most structures, but it seems to choke on \'if\' blocks. The c

10条回答
  •  眼角桃花
    2020-12-08 13:33

    Be sure to set the editor to use space characters and not tabs. The editor seems to completely lose its mind when tabs are used. This is a shame because all those space characters end up in the actual HTML output, greatly increasing the data transfer size. What I do is manually supplement the automatic formatting as I type. Not ideal, but hopefully Microsoft will have this figured out for the next service pack.

提交回复
热议问题