lib/asciidoctor/iso/ref.rb in asciidoctor-iso-0.10.0 vs lib/asciidoctor/iso/ref.rb in asciidoctor-iso-0.10.1

- old
+ new

@@ -64,11 +64,11 @@ t.note(**plaintxt) { |p| p << "ISO DATE: #{m[:fn]}" } end end def isorefmatches3(xml, m) - hasyr = m.named_captures.has_key?("year") + hasyr = m.names.include?("year") ref = fetch_ref xml, m[:code], hasyr ? m[:year] : nil, all_parts: true return use_my_anchor(ref, m[:anchor]) if ref xml.bibitem(**attr_code(ref_attributes(m))) do |t| t.title(**plaintxt) { |i| i << ref_normalise(m[:text]) } t.docidentifier "#{m[:code]}" @@ -103,10 +103,10 @@ Utils::warning(node, "no anchor on reference", item) return end unless m[:code] && /^\d+$/.match(m[:code]) ref = fetch_ref xml, m[:code], - m.named_captures.has_key?("year") ? m[:year] : nil, {} + m.names.include?("year") ? m[:year] : nil, {} return use_my_anchor(ref, m[:anchor]) if ref end refitem_render(xml, m) end