Added project-root var resolution in readme generation script
This commit is contained in:
@@ -17,7 +17,10 @@ end
|
||||
file = ARGV[0] if ARGV.length>0
|
||||
|
||||
# Copied from https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/scripts/asciidoc-coalescer.rb
|
||||
doc = Asciidoctor.load_file file, safe: :unsafe, header_only: true, attributes: options[:attributes]
|
||||
attributes = {}
|
||||
attributes['project-root'] = File.expand_path("#{base_dir}/../")
|
||||
|
||||
doc = Asciidoctor.load_file file, safe: :unsafe, header_only: true, attributes: attributes
|
||||
header_attr_names = (doc.instance_variable_get :@attributes_modified).to_a
|
||||
header_attr_names.each {|k| doc.attributes[%(#{k}!)] = '' unless doc.attr? k }
|
||||
attrs = doc.attributes
|
||||
|
||||
Reference in New Issue
Block a user