lib/asciidoctor/extensions.rb in asciidoctor-2.0.0.rc.2 vs lib/asciidoctor/extensions.rb in asciidoctor-2.0.0.rc.3
- old
+ new
@@ -199,21 +199,21 @@
end
block
end
def create_inline parent, context, text, opts = {}
- Inline.new parent, context, text, opts
+ Inline.new parent, context, text, context == :quoted ? ({ type: :unquoted }.merge opts) : opts
end
# Public: Parses blocks in the content and attaches the block to the parent.
#
# Returns The parent node into which the blocks are parsed.
#--
# QUESTION is parse_content the right method name? should we wrap in open block automatically?
def parse_content parent, content, attributes = nil
reader = Reader === content ? content : (Reader.new content)
- while ((block = Parser.next_block reader, parent, (attributes ? attributes.dup : {})) && parent << block) ||
+ while ((block = Parser.next_block reader, parent, (attributes ? attributes.merge : {})) && parent << block) ||
reader.has_more_lines?
end
parent
end
@@ -223,10 +223,11 @@
[:create_open_block, :create_block, :open],
[:create_example_block, :create_block, :example],
[:create_pass_block, :create_block, :pass],
[:create_listing_block, :create_block, :listing],
[:create_literal_block, :create_block, :literal],
- [:create_anchor, :create_inline, :anchor]
+ [:create_anchor, :create_inline, :anchor],
+ [:create_inline_pass, :create_inline, :quoted],
].each do |method_name, delegate_method_name, context|
define_method method_name do |*args|
args.unshift args.shift, context
send delegate_method_name, *args
end