aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/parser.rb')
-rw-r--r--lib/parser.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/parser.rb b/lib/parser.rb
index 8ae3303..e644dc6 100644
--- a/lib/parser.rb
+++ b/lib/parser.rb
@@ -6,7 +6,7 @@ module NulDoc
@template_dir = template_dir
end
- def parse_file(file_path)
+ def parse_file(file_path, document_type)
Asciidoctor.load_file(
file_path,
backend: :html5,
@@ -15,9 +15,11 @@ module NulDoc
safe: :unsafe,
template_dirs: [@template_dir],
template_engine: 'erb',
+ template_engine_options: { erb: { trim: '<>' } },
attributes: @common_attributes.merge({
'source-file-path' => file_path,
'href' => file_path.sub(@content_dir, '').sub('.adoc', '/'),
+ 'document-type' => document_type,
}),
extension_registry: Asciidoctor::Extensions.create do
tree_processor Nuldoc::Extensions::RevisionHistoryProcessor