lib/asciidoctor/iso/inline.rb in asciidoctor-iso-0.9.5 vs lib/asciidoctor/iso/inline.rb in asciidoctor-iso-0.9.6

- old
+ new

@@ -31,28 +31,34 @@ matched = /^fn(:\s*(?<text>.*))?$/.match node.text f = matched.nil? ? "inline" : "footnote" c = matched.nil? ? node.text : matched[:text] t = node.target.gsub(/^#/, "").gsub(%r{(.)(\.xml)?#.*$}, "\\1") noko do |xml| - xml.xref c, **attr_code(target: t, type: f) + xml.xref **attr_code(target: t, type: f) do |x| + x << c + end end.join end def inline_anchor_link(node) contents = node.text - contents = nil if node.target.gsub(%r{^mailto:}, "") == node.text + contents = "" if node.target.gsub(%r{^mailto:}, "") == node.text attributes = { "target": node.target } noko do |xml| - xml.link contents, **attr_code(attributes) + xml.link **attr_code(attributes) do |l| + l << contents + end end.join end def inline_anchor_bibref(node) eref_contents = node.target == node.text ? nil : node.text eref_attributes = { id: node.target } @refids << node.target noko do |xml| - xml.ref eref_contents, **attr_code(eref_attributes) + xml.ref **attr_code(eref_attributes) do |r| + r << eref_contents + end end.join end def inline_callout(node) noko do |xml|