gjtorikian / html-pipeline

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

Pass context along to every part of the pipeline #403

Closed gjtorikian closed 2 months ago

gjtorikian commented 2 months ago

This PR allows for more correct abstractions around contexts for the pipeline. Context for each filter can now be passed when the filter is instantiated, or, when the pipeline is called. This allows for the same filters and pipelines to execute in different ways, depending on the context at runtime.

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