gjtorikian / html-pipeline

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

Support multiple dependencies per filter #351

Closed gjtorikian closed 3 years ago

gjtorikian commented 3 years ago

Closes https://github.com/gjtorikian/html-pipeline/issues/200.

Adds a new method, require_dependencies, which allows for the loading of multiple dependencies to satisfy a filter's needs. Once a dependency is found, a #{name_loaded?} method is generated, which is true for the matched dependency. This can then be used in the filter to account for differences in rendering logic.