yuenm18 / ooxml-viewer-vscode

An OOXML Viewer for Visual Studio Code
MIT License
64 stars 10 forks source link

One week experience report #13

Closed shumi2nd closed 3 years ago

shumi2nd commented 3 years ago

Hello, it's me again. I have been experiencing this plugin for several days. This plugin is really great and has greatly improved my learning efficiency.Thank u very much!😊 Then feedback a small problem: XML file formatting.When encountered with "/ >"The ending single-line label is mistakenly formatted into two lines and incorrectly indented.The current solution is to work with this plugin. But my ability is limited, so maybe you can perfect it in the next version.😊

mikeebowen commented 3 years ago

@shumi2nd Could you please send a sample of how the viewer is formatting the xml currently and also how you think it should be formatted.

Thanks!

shumi2nd commented 3 years ago

The first image is a formatting style opened using your plugin img01

The second image shows the effect of additional use of the RedHat XML plug-in img02

😊😊

shumi2nd commented 3 years ago

@shumi2nd Could you please send a sample of how the viewer is formatting the xml currently and also how you think it should be formatted.

Thanks!

The last few lines were incorrectly indented.

mikeebowen commented 3 years ago

Thanks for sending the images, I see what you mean now.

We use a package, vkbeautify, to format and minify the xml parts. We chose it, because it is the most efficient xml formatter we could find. It is a very opinionated formatter however, so there is no config option to format the xml parts like it is in your second image, so we aren't going to be able to change the formatting in the way you describe.

The xml is only formatted to make it more readable though. Any formatting is removed, because the xml is minified before updating the OOXML Document, so the format before being minified does not have an effect on what is written to the OOXML document, so if you're worried that incorrect data will be written to the OOXML document that is taken care of by the minimization.

Thanks for your support and please continue to submit any issues or questions 😃 😃