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

Legal comments break into lines after formatting #851

Closed
bkarolyi opened this issue Jan 2, 2023 · 4 comments · Fixed by eclipse/lemminx#1433
Closed

Legal comments break into lines after formatting #851

bkarolyi opened this issue Jan 2, 2023 · 4 comments · Fixed by eclipse/lemminx#1433
Assignees
Labels
bug Something isn't working formatting
Milestone

Comments

@bkarolyi
Copy link

bkarolyi commented Jan 2, 2023

After updating to the v0.23.0 version, legal comments break into lines after formatting.

Structure of the comment:

<!-- 
/*******************************************************************************
 * Lorem ipsum dolor sit amet, consectetur
 * © Copyright adipiscing elit. In eget magna ornare, 
 *
 * pharetra sapienvitae, iaculis purus. Sed et dignissim lacus. 
 * Morbi condimentum nisi eget sem laoreet placerat. 
 * Pellentesque diam elit, vehicula et auctor a, euismod a enim.
 *******************************************************************************/
 -->

becomes

<!-- 
/*******************************************************************************
* Lorem
ipsum dolor sit amet, consectetur
* © Copyright adipiscing elit. In eget magna ornare, 
*
*
pharetra sapienvitae, iaculis purus. Sed et dignissim lacus. 
* Morbi condimentum nisi eget sem
laoreet placerat. 
* Pellentesque diam elit, vehicula et auctor a, euismod a enim.
*******************************************************************************/
-->

Expected behaviour:
lines in comments don't break after formatting.

It is related to the 'Xml › Format: Max Line Width' setting. When I set it from the default 100 to 500 for example, it works fine, comments don't break.
It looks like the legal area considered as a one long string, that formatting wants to break to lines in every 100th character.

Update: The bullet points in the description are stars: *, just Github changed it.

@angelozerr
Copy link
Contributor

@JessicaJHee could you look at this issue please.Thanks!

@bkarolyi
Copy link
Author

bkarolyi commented Jan 5, 2023

Thank you!

@angelozerr
Copy link
Contributor

@bkarolyi please try to install prerelease https://github.com/redhat-developer/vscode-xml#contributing which should fix your issue

@bkarolyi
Copy link
Author

bkarolyi commented Jan 5, 2023

@bkarolyi please try to install prerelease https://github.com/redhat-developer/vscode-xml#contributing which should fix your issue

It fixed the issue, thank you!

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
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants