XML Minify support#1774
Conversation
157fa9b to
2c9e798
Compare
|
One thing to consider is adding this minifier as a "Source Action" CodeAction, so that it's available in the quickfix menu. This will make the feature usable in IDEs that don't implement the client-side logic to set up the command. If you don't think it's worth the effort though, I understand. |
| minifyText(edits, (DOMText) node); | ||
| break; | ||
| case Node.COMMENT_NODE: | ||
| // Keep comments as-is for now (could add option to remove them) |
There was a problem hiding this comment.
It might make sense to remove the comments by default. They don't "do" anything, and removing them will reduce the size of the document.
There was a problem hiding this comment.
Ok let me try to do that
Good point! I will try to do that but I dont want to execute minify everytime. I will provide a codeaction which will be executed on resolve code action. It means that client must support resolve code action otherwise minify will not available. Makes sense? |
Makes sense to me, it seems like it will be very expensive to compute on big files, so it makes sense to only do it if resolve is available. |
c69ddbe to
41ddfba
Compare
Fixes redhat-developer/vscode-xml#609 Signed-off-by: azerr <azerr@redhat.com>
41ddfba to
acb6641
Compare
datho7561
left a comment
There was a problem hiding this comment.
Looks good. Thanks, Angelo!
See redhat-developer/vscode-xml#609