digitalsparky / jekyll-minifier

Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
GNU General Public License v3.0
245 stars 25 forks source link

Exclusion fix #28

Closed sonnym closed 7 years ago

sonnym commented 7 years ago

I noticed a typo in the branch name on the other pull request, so here is an improved one!

This fixes persistent issues with excluding files. In essence, the coercion from string keys to symbol keys in output_html violated idempotency; i.e. the first attempt to get the exclude setting would work via a string, but then failed in subsequent attempts, since a symbol would be required. This pull request just uses string keys throughout.

I also greatly simplified how exclusion checking works by making use of Kernel#Array, Array#any?, and Hash#dig.

digitalsparky commented 7 years ago

Thanks for your contribution :).

sonnym commented 7 years ago

My pleasure! Thank you for this convenient plugin!