-
-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Related to #23, I took another approach, instead to remove extra options. I patched it on the fly in config.rb:
class ::PandocRuby
module OptionPatch
OPT_REMOVE_LIST = [:outvar, :context]
# opts passed in. Recursively calls itself in order to handle hash options.
def prepare_options(opts = [])
opts.inject('') do |string, (option, value)|
string + if value
create_option(option, value)
elsif option.respond_to?(:each_pair)
option = filter_option_hash(option)
prepare_options(option)
else
create_option(option)
end
end
end
def filter_option_hash(hash)
hash.reject do |k,v|
OPT_REMOVE_LIST.include?(k)
end
end
end
end
PandocRuby.prepend PandocRuby::OptionPatchMetadata
Metadata
Assignees
Labels
No labels