FabianLauer / vs-code-xml-format

Simple XML formatter for Visual Studio Code.
https://marketplace.visualstudio.com/items/fabianlauer.vs-code-xml-format
MIT License
7 stars 5 forks source link

Attribute ending in backslash fails formatting #6

Closed KarlGunderson closed 8 years ago

KarlGunderson commented 8 years ago

An attribute like:

<absPath url="D:\Users\kgunders\Documents\MR\Projects\HyperLinkSheets\"

Will cause the following error:

XML formatting failed: at line 2, column 694: namespace prefix must be followed by a tag name.

Here is more context from the problematic XML:

    <Choice Requires="x15">
        <absPath url="D:\Users\kgunders\Documents\MR\Projects\HyperLinkSheets\" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac" />
    </Choice>

A work around is to temporarily add a character after the backslash, format, and remove the extra character.

FabianLauer commented 8 years ago

@KarlGunderson Thank you for this hint. I'm looking into it right now 👍

FabianLauer commented 8 years ago

This problem is now fixed in the XML library. There'll be an update for the extension soon 😃