summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-04-19 14:04:40 +0200
committerlonkaars <loek@pipeframe.xyz>2024-04-19 14:04:48 +0200
commitff38fcf9e42cddf298375032b7643e6001954329 (patch)
tree9e63fe7188b8533ef307931212ba2e37c2d06c09 /lib
parent329c9d28f2b88947d7ff24171f9d7ce5b87a064f (diff)
fix #6 (plugin fails to load)
This plugin failed to load under Asciidoctor 2.0.22 due to a difference between the signature of the initialize method on the base Asciidoctor::Extensions::TreeProcessor class and the implemented initialize method in lib/asciidoctor/interdoc_reftext/processor.rb. This commit modifies the function signature, and makes it so the Processor class is now directly instantiated instead of by a reference passed to the initialize method.
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/interdoc_reftext/processor.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/asciidoctor/interdoc_reftext/processor.rb b/lib/asciidoctor/interdoc_reftext/processor.rb
index 22f6822..2aceba5 100644
--- a/lib/asciidoctor/interdoc_reftext/processor.rb
+++ b/lib/asciidoctor/interdoc_reftext/processor.rb
@@ -63,9 +63,8 @@ module Asciidoctor::InterdocReftext
# @param resolver_class [#new] the {Resolver} class to use.
# @param resolver_opts [Hash<Symbol, Object>] options to be passed into
# the resolver_class's initializer (see {Resolver#initialize}).
- def initialize(resolver_class: Resolver, **resolver_opts)
+ def initialize(resolver_opts)
super
- @resolver_class = resolver_class
@resolver_opts = resolver_opts
# Monkey-patch Asciidoctor::Inline unless already patched.
@@ -82,7 +81,7 @@ module Asciidoctor::InterdocReftext
# @param document [Asciidoctor::Document] the document to process.
def process(document)
- resolver = @resolver_class.new(document, **@resolver_opts)
+ resolver = Resolver.new(document, **@resolver_opts)
document.instance_variable_set(RESOLVER_VAR_NAME, resolver)
nil
end