Deminify js code in <script> tags. #2

Open
nandod opened this Issue Nov 17, 2011 · 5 comments

Comments

Projects
None yet
3 participants

nandod commented Nov 17, 2011

Hello,
it would be nice if jsdeminifier could deminify js code in < script > tags inside text/html responses. I tried to add text/html to the list of supported mime types but it tries to deminify everything thus breaking the HTML.

Owner

benmmurphy commented Nov 23, 2011

This is a nice idea but it is quite tricky do do :(

nandod commented Nov 23, 2011

I guess so. :-( It would need to parse the stream and only pass what's between <script> and </script> to the beautifier. Or an alternate beautifier that doesn't mangle HTML code, which I am not aware of.

nandod commented Nov 23, 2011

Between < script > and </ script > I meant.

Owner

benmmurphy commented Nov 23, 2011

this is true. sounds a bit easier than I thought it would be. i'll start work on it after i have closed off #3

hello, any news on this feature? :)
if I paste HTML code on jsbeautify.com it can manage the HTML, maybe you could update the algorithm?
then it would be enough to insert text/html in the extensions.jsdeminifier.contenttypes config, to pass all the HTML to the deminifier!
thanks!

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