Sha256: 7f183e9b36db2b0662f01afb3804dda8d7dfa5e57a8046968ac8b24fd3a4581e
Contents?: true
Size: 1.14 KB
Versions: 12
Compression:
Stored size: 1.14 KB
Contents
require "date" require "nokogiri" require "htmlentities" require "json" require "pathname" require "open-uri" require "pp" module Asciidoctor module ISO class Converter < Standoc::Converter PRE_NORMREF_FOOTNOTES = "//foreword//fn | //introduction//fn |"\ "//clause[title = 'Scope']//fn" .freeze NORMREF_FOOTNOTES = "//references[title = 'Normative References']//fn |"\ "//references[title = 'Normative References']//bibitem/note".freeze POST_NORMREF_FOOTNOTES = "//clause[not(title = 'Scope')]//fn | "\ "//references[title = 'Bibliography']//fn | "\ "//references[title = 'Bibliography']//bibitem/note".freeze def other_footnote_renumber(xmldoc) seen = {} i = 0 xmldoc.xpath(PRE_NORMREF_FOOTNOTES).each do |fn| i, seen = other_footnote_renumber1(fn, i, seen) end xmldoc.xpath(NORMREF_FOOTNOTES).each do |fn| i, seen = other_footnote_renumber1(fn, i, seen) end xmldoc.xpath(POST_NORMREF_FOOTNOTES).each do |fn| i, seen = other_footnote_renumber1(fn, i, seen) end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems