今天我更新了vetur
然后使用 js-beautify-html后,格式化得到的结果

template标签里面的格式化错位了
当代码行数多了,错位更严重,影响开发
我也发现了这个问题。
今天更新到Vetur version: 0.12.7,
只要是input、img等无需闭合的标签,都会格式化错位。希望解决!
https://vuejs.github.io/vetur/formatting.html#js-beautify-html-deprecated
Alternative html formatter. Deprecated, turned off by default and will be removed soon. js-beautify is not actively maintained and has many long-standing bugs. Use at your own risk.
You should open issues for js-beautify. Thanks.
I got the same issue. I wonder if js-beautify-html is deprecated, what can i use
@shangxinbo I'm working on https://github.com/vuejs/vetur/pull/912.
Actually for people in this thread, see https://github.com/vuejs/vetur/issues/921#issuecomment-426710032
You can set the below setting until the upcoming release, when I'll make it the default setting.
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"unformatted": []
}
}
@octref Thanks!This has bothered me for a long time.
Most helpful comment
我也发现了这个问题。
今天更新到Vetur version: 0.12.7,
只要是input、img等无需闭合的标签,都会格式化错位。希望解决!