christianklisch / slim-minify

PHP slim framework middleware to minify HTML output
MIT License
37 stars 9 forks source link

Support for JavaScript Comments #3

Closed sankalpsans closed 8 years ago

sankalpsans commented 8 years ago

Support for removal of JavaScript comments, since many inline script snippets are often present in templates. Without this a section like

<script>
console.log(1);
//console.log(2);
console.log(3);
</script>

changes to <script>console.log(1);//console.log(2);console.log(3);</script> thus effectively commenting out the third console.log() As a solution, I have removed the commented part in output file, which also helps in the cause of minification.

christianklisch commented 8 years ago

thanks @sankalpsans very nice feature :)