gjtorikian / html-pipeline

HTML processing filters and utilities
MIT License
2.27k stars 383 forks source link

Handle odd numbers of NodeFilters to be configured #389

Closed stevehill1981 closed 11 months ago

stevehill1981 commented 11 months ago

The previous method of merging the results from the NodeFilter instances was breaking because Ruby was treating it as a series of 2-element arrays.

If you had 0, 1 or 2 node filters configured, it would work fine; if you added a third, it would break with an ArgumentError. Adding a fourth makes it work again.

Fixes #388

gjtorikian commented 11 months ago

Gah, thanks. for catching this, and the fix! Will go out as 3.0.1.