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 node content inserts new line without proper indentation #152

Closed
fbricon opened this issue Sep 28, 2018 · 5 comments
Closed

Formatting node content inserts new line without proper indentation #152

fbricon opened this issue Sep 28, 2018 · 5 comments
Assignees
Labels
bug Something isn't working formatting This issue or enhancement is related to formatting support in progress

Comments

@fbricon
Copy link
Contributor

fbricon commented Sep 28, 2018

When "format.joinContentLines":false, formatting a node with text in it puts the text in the next line, with no indentation:

bad-format

Both Eclipse and IntelliJ keep the text at the same place. If a new line was to be inserted (which I'm really not sure about), at least some proper indentation should be used.

@fbricon fbricon added bug Something isn't working formatting This issue or enhancement is related to formatting support labels Sep 28, 2018
@fbricon
Copy link
Contributor Author

fbricon commented Sep 28, 2018

I actually think adding a new line is wrong, as it definitely changes the data value

@NikolasKomonen NikolasKomonen self-assigned this Oct 3, 2018
@NikolasKomonen
Copy link
Contributor

@fbricon

Would a result of

<property> some test data
</property>

be the best option?

@apupier
Copy link
Contributor

apupier commented Oct 3, 2018

the content of the property node should not be modified on formatting, otherwise the value is modified. All tabs, space and new lines should be kept, otherwise the semantic of the xml is modified.

@NikolasKomonen
Copy link
Contributor

@apupier
So

<a> My

Text

Content</a>

should remain as it is when formatted?

Instead of:

<a> My

Text

Content
</a>

@apupier
Copy link
Contributor

apupier commented Oct 5, 2018

yes. it is the only to not change the semantic of the xml.

NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Oct 5, 2018
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Oct 5, 2018
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Oct 5, 2018
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Oct 9, 2018
@fbricon fbricon added in progress and removed to do labels Oct 9, 2018
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 in progress
Projects
None yet
Development

No branches or pull requests

3 participants