yuenm18 / ooxml-viewer-vscode

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

Comments not preserved in XML parts #37

Closed tomjebo closed 2 years ago

tomjebo commented 2 years ago

I'm using version 1.2.2 on Windows 10. When I edit a part of an OOXML package and add a comment liek the following:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<calcChain xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <!-- <c r="C1" i="1" l="1"/> -->
  <c r="C1" i="1" l="1"/>
</calcChain>

Upon save (Ctrl-S in VS Code), the part is saved but the commented line disappears.

Is it possible to preserve the comment?

mikeebowen commented 2 years ago

This should be a small change. We can add the option to preserve comments in setttings.json.

tomjebo commented 2 years ago

Awesome! Thanks @mikeebowen