Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Resolves #4, Reintroduce the CompositeConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Oct 1, 2016
1 parent ac11235 commit 5f28a3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/asciidoctor/core_ext/factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def create backend, opts = {}
unless defined? ::Asciidoctor::Converter::CompositeConverter
require 'asciidoctor/converter/composite'.to_s
end
TemplateConverter.new backend, opts[:template_dirs], opts
template_converter = TemplateConverter.new backend, opts[:template_dirs], opts
CompositeConverter.new backend, template_converter, base_converter
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions lib/asciidoctor/core_ext/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ def initialize backend, template_dirs, opts = {}
end
end

def handles? name
!(resolve_template name).nil?
end

def resolve_template name
path_resolver = PathResolver.new
backend = @backend
Expand Down

0 comments on commit 5f28a3a

Please sign in to comment.