Open lhajh opened 5 years ago
@lhajh 捋了捋,发现这种情况有点难受~需要有较大改动 暂时先关闭 attr_end_with_gt 配置使用;或者暂时关闭html格式化
@lhajh 在 0.1.5 中使用优化方案来处理 issues#12 取消对 js-beautify 中 html.unformatted 标签的 属性断行【例如,span 标签,不在对其attrs 做断行处理,inline标签不作任何处理。如需格式化对应标签,可在 vue-format.js-beautify.html.force_format 中添加对应标签名,如“template”】
@win7killer 喵?喵?喵?意思就是说现在只格式块元素?如果需要格式化 inline
标签,需要添加到 vue-format.js-beautify.html.force_format
中?我把 span
添加进去以后,还是出现上面的问题
那就是说这个问题暂时解决不了,先规避掉吗?
@lhajh 按照 js-beautify 对 html 格式化的策略来说,对于 unformatted 的标签时不做任何处理的。 我这边用的方案暂时是解决不了,所以受影响的就是 unformatted 的标签,不会对 attrs 断行处理。
回头找到合适方案的话,会同步的~
@win7killer 👌
Describe the bug [描述]:
格式前:
格式后: