DotJoshJohnson / vscode-xml

XML Tools for Visual Studio Code
MIT License
320 stars 87 forks source link

xml:space="preserve" #303

Open 1261466029 opened 4 years ago

1261466029 commented 4 years ago

When xmltools executes to an element with the attribute, the space for value is ignored. before:

after:
DotJoshJohnson commented 4 years ago

Are you formatting or minifying your XML?

related: #262

seansfkelley commented 2 years ago

I just ran across this issue as well. I'm formatting the XML with XML Tools: Format as XML command. I'm on v2.5.1.

https://user-images.githubusercontent.com/2101409/137480179-f4b608e9-8435-46fb-8197-d003d77e3552.mov

For anyone else who might stumble upon this, the Redhat XML extension does preserve whitespace, but you have to enable it with a flag.

1261466029 commented 2 years ago

我也遇到了这个问题。我正在使用XML Tools: Format as XML命令 XML。我在 v2.5.1 上。

Screen.Recording.2021-10-15.at.12.29.04.mov 对于可能发现这一点的任何其他人,偶尔 Redhat XML 扩展保留了空白,但您必须使用标志启用它

thank you!

ubmarco commented 1 year ago

Same issue here for v2.5.1