lib/asciidoctor/extensions.rb in asciidoctor-2.0.0 vs lib/asciidoctor/extensions.rb in asciidoctor-2.0.1

- old
+ new

@@ -195,11 +195,11 @@ attrs['alt'] ||= (attrs['default-alt'] = Helpers.basename(target, true).tr('_-', ' ')) title = (attrs.key? 'title') ? (attrs.delete 'title') : nil block = create_block parent, :image, nil, attrs, opts if title block.title = title - block.assign_caption((attrs.delete 'caption'), (opts[:caption_context] || 'figure')) + block.assign_caption (attrs.delete 'caption'), (opts[:caption_context] || 'figure') end block end def create_inline parent, context, text, opts = {} @@ -317,11 +317,11 @@ def default_attributes value option :default_attrs, value end # NOTE default_attrs alias is deprecated - alias default_attr default_attributes + alias default_attrs default_attributes def resolve_attributes *args # NOTE assume true as default value; rewrap single-argument string or symbol if (args = args.fetch 0, true).respond_to? :to_sym args = [args] @@ -482,12 +482,10 @@ # # DocinfoProcessors implementations must extend DocinfoProcessor. # If a location is not specified, the DocinfoProcessor is assumed # to add content to the header. class DocinfoProcessor < Processor - attr_accessor :location - def initialize config = {} super config @config[:location] ||= :head end @@ -582,13 +580,13 @@ include SyntaxProcessorDsl def resolve_attributes *args if args.size == 1 && !args[0] option :content_model, :text - return + else + super + option :content_model, :attributes end - super - option :content_model, :attributes end # NOTE resolves_attributes alias is deprecated alias resolves_attributes resolve_attributes end