Skip to content

Help with adding a filter as an option to Paru::Pandoc.new.configure #80

Answered by htdebeer
impostorsguides asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Thanks for your issue. I see you've managed to solve most of it! To get your example working, I had to change your filter to:

#!/bin/env ruby
require "paru/filter"

Paru::Filter.run do
  with "Image" do |image|
      puts "found image!"
    end
end

That first line makes it an "executable script" on my operating system. But that differs from system to system.

More importantly, you wrote Paru::Filter.new, but that should have been Paru::Filter.run. #run is a convenience method to create a filter, connect it to standard input and standard output, and then define and run a filter.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@impostorsguides
Comment options

Answer selected by impostorsguides
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants