Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One word causes XML formatter to fail #294

Closed
Amarok24 opened this issue Dec 2, 2019 · 2 comments
Closed

One word causes XML formatter to fail #294

Amarok24 opened this issue Dec 2, 2019 · 2 comments

Comments

@Amarok24
Copy link

Amarok24 commented Dec 2, 2019

Description

A valid XML cannot be formatted by XML Formatter.
Error message: Running the contributed command 'xmlTools.formatAsXml' failed.
See attached screenshot of a most simple case.
If the word "ThisCausesBug" (line 13) is removed then the XML can be formatted.
Or: if the IMG on line 15 is removed the XML can be formatted as well.

Formatter Implementation

v2

XML Tools Version

2.5.0

VS Code Version

1.40.2

Operating System

Windows_NT x64 10.0.18362

xmlformatter-error

@DotJoshJohnson DotJoshJohnson added this to the Release: v2.5.1 milestone Jul 2, 2020
@DotJoshJohnson
Copy link
Owner

I am not able to reproduce this. Can you attach a file or paste an example (not a screenshot) of XML that produces the error? Thanks!

@DotJoshJohnson DotJoshJohnson self-assigned this Jul 9, 2020
@DotJoshJohnson DotJoshJohnson removed this from the Release: v2.5.1 milestone Jul 18, 2020
DotJoshJohnson added a commit that referenced this issue Jul 26, 2020
@Amarok24
Copy link
Author

Hi, sorry for the late reply. Here is the XML code from the screenshot, I just had to rename the extension from xml to txt, Github didn't allow me to upload an xml file.
test.txt

When you run the source formatting with XML Tools (I am currently using v2.5.1, VSCode version 1.47.3) then the resulting code has wrong alignment especially on lines 19 (closing div) and 21 (closing xsl:template), which do not line up with lines 11 and 13 respectively.
test-formatted.txt
Once you remove the word "ThisCausesBug" and re-run code formatting then everything is aligned perfectly.

BR,
Jan

DotJoshJohnson added a commit that referenced this issue Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants