Swaagie / minimize

Minimize HTML
MIT License
162 stars 18 forks source link

Add ability to pass options to htmlparser2 #43

Closed jlas closed 9 years ago

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.01%) to 98.48% when pulling 0b82950ddecd998065cc7f75d784df95a8644736 on jlas:master into ef75cced5b540fa4b8c1ec5cc2c244a8b71d3396 on Moveo:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.01%) to 98.48% when pulling 0b82950ddecd998065cc7f75d784df95a8644736 on jlas:master into ef75cced5b540fa4b8c1ec5cc2c244a8b71d3396 on Moveo:master.

Swaagie commented 9 years ago

Going to continue the discussion here to not derail the other issue to much.

I really like the idea of allowing more control over the DOM parser. However, perhaps in stead of only passing the options, it would make more sense to allow an entire custom parser instance. What do you think?

I personally haven't seen the use of <button><input></button> before. That said, this is of course not really the issue. Might be better to have a different example in the docs though.

jlas commented 9 years ago

Entire parser instance could also work, but may be overkill for this use case. Either way, this seems like more of an issue with htmlparser2, and my comment in the Issue was meant more as a work around in case other people un into the issue. Feel free to close the pull request as I don't intend to use that code.

On Sat, Apr 25, 2015 at 7:53 PM, Martijn Swaagman notifications@github.com wrote:

Going to continue the discussion here to not derail the other issue to much.

I really like the idea of allowing more control over the DOM parser. However, perhaps in stead of only passing the options, it would make more sense to allow an entire custom parser instance. What do you think?

I personally haven't seen the use of before. That said, this is of course not really the issue. Might be better to have a different example in the docs though.

— Reply to this email directly or view it on GitHub https://github.com/Moveo/minimize/pull/43#issuecomment-96296188.

Swaagie commented 9 years ago

Closing, on request of the author, created issue https://github.com/Moveo/minimize/issues/47 to provide entire custom instance.