lib/asciidoctor/iso/ref.rb in asciidoctor-iso-0.9.9 vs lib/asciidoctor/iso/ref.rb in asciidoctor-iso-0.10.0
- old
+ new
@@ -91,21 +91,21 @@
def refitem_render(xml, m)
xml.bibitem **attr_code(id: m[:anchor]) do |t|
t.formattedref **{ format: "application/x-isodoc+xml" } do |i|
i << ref_normalise_no_format(m[:text])
end
- t.docidentifier(/^\d+$/.match?(m[:code]) ? "[#{m[:code]}]" : m[:code])
+ t.docidentifier(/^\d+$/.match(m[:code]) ? "[#{m[:code]}]" : m[:code])
end
end
# TODO: alternative where only title is available
def refitem(xml, item, node)
unless m = NON_ISO_REF.match(item)
Utils::warning(node, "no anchor on reference", item)
return
end
- unless m[:code] && /^\d+$/.match?(m[:code])
+ unless m[:code] && /^\d+$/.match(m[:code])
ref = fetch_ref xml, m[:code],
m.named_captures.has_key?("year") ? m[:year] : nil, {}
return use_my_anchor(ref, m[:anchor]) if ref
end
refitem_render(xml, m)
@@ -174,9 +174,14 @@
end
def bibliocache_name(global)
global ? "#{Dir.home}/.relaton-bib.pstore" :
"#{@filename}.relaton.pstore"
+ end
+
+ def ievcache_name(global)
+ global ? "#{Dir.home}/.iev.pstore" :
+ "#{@filename}.iev.pstore"
end
end
end
end