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

Formatting with "xml.format.emptyElements": "expand" chokes on malformed XML #650

Closed
fbricon opened this issue Apr 22, 2020 · 3 comments · Fixed by #1330
Closed

Formatting with "xml.format.emptyElements": "expand" chokes on malformed XML #650

fbricon opened this issue Apr 22, 2020 · 3 comments · Fixed by #1330
Assignees
Labels
bug Something isn't working formatting This issue or enhancement is related to formatting support
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Apr 22, 2020

Set "xml.format.emptyElements": "expand" in the preferences, then

<?xml version="1.0" encoding="UTF-8" ?>
<a>
    <a>
        <a/></a>
    </a>
</a>

after formatting, becomes:

<?xml version="1.0" encoding="UTF-8" ?>
<a>
    <a>
        <a></a>
    </a>
</a></a>

Apr-22-2020 11-33-10

@fbricon fbricon added bug Something isn't working formatting This issue or enhancement is related to formatting support labels Apr 22, 2020
@angelozerr angelozerr added this to the 0.12.0 milestone Apr 22, 2020
@angelozerr
Copy link
Contributor

@fbricon I don't see a real bug here, what do you want to have as format result?

@fbricon fbricon removed this from the 0.12.0 milestone Jun 3, 2020
@angelozerr
Copy link
Contributor

I think experimental formatter should fix this issue.

@JessicaJHee could you check that and write a test by using the usecase of this issue please.

@angelozerr
Copy link
Contributor

This issue is fixed with experimental formatter. @JessicaJHee wrote a test for this usecase.

@angelozerr angelozerr added this to the 0.22.0 milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatting This issue or enhancement is related to formatting support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants