Closed stevehill1981 closed 11 months ago
Looks like this is being triggered here: https://github.com/gjtorikian/html-pipeline/blob/6c9d27efa0f9a73c5918bc26f96c5afcf179a760/lib/html_pipeline.rb#L181
It doesn't fail until we have more than 2 node filters defined; when I stripped back to just 1, it worked correctly. As soon as I added the third, it failed. When I added the fourth, it worked!
I suspect it's going to fail with 5, work with 6 and so on...
If you configure a
HTMLPipeline
with an odd number ofnode_filters
, you get anArgumentError
:Using an even number of
node_filters
allows it to work as expected. I'd guess that the array is being turned into aHash
somewhere, which does make me wonder if the node filters are being correctly called (but I haven't proven this yet).This works:
This does not:
I'll have a further dig and PR if I can find the issue, but maybe someone else already knows!