Skip to content

Switch to minify-xml for xmlmin#27

Open
kristian wants to merge 1 commit intovkiryukhin:masterfrom
kristian:master
Open

Switch to minify-xml for xmlmin#27
kristian wants to merge 1 commit intovkiryukhin:masterfrom
kristian:master

Conversation

@kristian
Copy link

@kristian kristian commented Aug 6, 2020

I would like to get rid of the phun on my README.md [1]. pretty-data is
currently not minifying very much in regards to XML optimization. Thus
I would like to suggest, you could switch to my library minify-xml. It
is also based on simple regular expression replacements, thus it is fits
very well to your library. I also took your "between tags" and "comment"
regular expressions and adapted them.

This change is compatible to existing usages of your API. If
preserveComments is set, it will be forwarded to my library with the
same behaviour.

This is just a suggestion, but my library is optimizing many more things
in regards to XML such as removing unnecessary whitespace in attributes,
removing unused namespaces, collapsing empty elements. It also features
a better CDATA handling, as the way you did it could easily fail when
to be optimized things are part of CDATA.

[1] https://github.com/kristian/minify-xml#readme

I would like to get rid of the phun on my README.md [1]. pretty-data is
currently not minifying very much in regards to XML optimization. Thus
I would like to suggest, you could switch to my library minify-xml. It
is also based on simple regular expression replacements, thus it is fits
very well to your library. I also took your "between tags" and "comment"
regular expressions and adapted them.

This change is compatible to existing usages of your API. If
preserveComments is set, it will be forwarded to my library with the
same behaviour.

This is just a suggestion, but my library is optimizing many more things
in regards to XML such as removing unnecessary whitespace in attributes,
removing unused namespaces, collapsing empty elements. It also features
a better CDATA handling, as the way you did it could easily fail when
to be optimized things are part of CDATA.

[1] https://github.com/kristian/minify-xml#readme
@kristian
Copy link
Author

kristian commented Aug 6, 2020

Fixes #15, #16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant