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

document formatter inserts unnecessary whitespaces #139

Open
SchabaJo opened this issue Jul 16, 2024 · 1 comment
Open

document formatter inserts unnecessary whitespaces #139

SchabaJo opened this issue Jul 16, 2024 · 1 comment

Comments

@SchabaJo
Copy link

Hello!

Formatting an XSLT document (others not tested) results in otherwise empty lines filled with spaces to reach target indentation level.
Here is an example, select text to view differences:

Before:

<book>
    <author>
        <firstname>John</firstname>

        <lastname>Doe</lastname>
    </author>
</book>

After:

<book>
    <author>
        <firstname>John</firstname>
        
        <lastname>Doe</lastname>
    </author>
</book>

Version information:

  • VS Code
    • Version: 1.91.1 (user setup)
    • Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
    • Datum: 2024-07-09T22:06:49.809Z
    • Electron: 29.4.0
    • ElectronBuildId: 9728852
    • Chromium: 122.0.6261.156
    • Node.js: 20.9.0
    • V8: 12.2.281.27-electron.0
    • Operating system: Windows_NT x64 10.0.19045
  • Extension: deltaxml.xslt-xpath v1.5.15

Best regards,
Josef

@pgfearo
Copy link
Member

pgfearo commented Nov 18, 2024

It can help to have the indentation when editing the XML, I propose adding a "Keep indents on empty lines" setting that defaults to true (as this is the current behaviour). Other editors provide this option too.

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