Error when passing instance of `TextFilter` class to `text_filters` option
Closed this issue · 3 comments
When passing an instance of the TextFilter
class to the text_filters
option as per the sample code, it results in a wrong number of arguments (given 2, expected 1)
error.
Steps to Reproduce
pipeline = HTMLPipeline.new(text_filters: [ HTMLPipeline::TextFilter::PlainTextInputFilter.new])
pipeline.call('test')
Workaround
pipeline = HTMLPipeline.new(text_filters: [ HTMLPipeline::TextFilter::PlainTextInputFilter])
pipeline.call('test')
Additional Information
html-pipeline/lib/html_pipeline.rb
Line 213 in e1328b4
Which version of html-pipeline
is this? Recently there was a change to this exact behavior—the latest version is 3.1.0. Could you try your example with that?
Thank you for your response.
I'm using 3.1.0.
The issue arises because although keyword arguments are being passed to the call method, the TextFilter class's call method only accepts the text argument.
html-pipeline/lib/html_pipeline.rb
Line 213 in e1328b4
Gah, thank you for noticing that. 3.1.1 is released, fixing this.