-
Notifications
You must be signed in to change notification settings - Fork 82
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
"Join CDATA Lines" option not working on Format #719
Comments
I have a feeling that this may be to do with the XML Language server being updated, and therefore I would need clone and build the Language server locally including the new updates. I have followed the steps in the "Contribution" section and have built the server, however VS Code still appears to be attempting to download the Language server when launched. |
you need to clone lemminx first |
Ah yep, that makes sense. Thank you for pointing me in the right direction. This now enables me to display the closing tag of a collapsed section, which also spans across multiline / unindented tags as expected. Interestingly, the "Join CDATA Lines" option still doesn't appear to work. I no longer need that option, due to the code collapsing working correctly when I packaged the server into the VSIX file, but I'm not sure why it wouldn't be formatting correctly regardless. |
looks like a regression that managed to creep through our test suite. I'm sure @angelozerr will figure it out |
No dramas. Thank you again for the assistance. |
@VeteraNovis you mean that join cdata formatting worked in old version? |
@VeteraNovis could you give us an XML snippet which cannot format correctly please in order to we can try it with experimental formatter and check if it works correctly. Thanks! |
I close this issue since experimental formatter fixes this issue @VeteraNovis please try with experimental formatter and reopen the issue if you have again the same issue. |
I have built the extension VSIX from source, using the master branch for version
0.21.0
which includes the new changes to show the closing tag on code folding. I'm interested in this feature to be able to more easily collapse and comment out large blocks of the XML. This new behaviour doesn't work however when nodes with CDATA are present with line breaks, causing the new lines within the CDATA tag to be completely un-indented.I turned on the "Join CDATA Lines" option and attempted to format the XML, but the CDATA lines did not join.
I have confirmed that the formatter is working by removing some tabs from a line and watching the formatter fix the tab spacing, however nothing appears to work regarding CDATA line joining.
Steps to reproduce
npm ci
vsce
package if needed withnpm install --location=global vsce
(My version is 2.9.1)vsce package
insidevscode-xml
directoryvscode-xml-0.21.0.vsix
xml.format.joinCDATALines
equal totrue
in VS Code settingsCtrl + Shift + P
and selectXML Tools: Format as XML
EDIT:
I had run the
npm build-server
command after I had already packaged the vsix file (Thank you @fbricon). This ensured that the language server was working locally as expected, but did not resolve the inability to join CDATA lines.Settings
The text was updated successfully, but these errors were encountered: