Sha256: 7b7982183c42b5246d5067bf17965bb8f4693c1c2e35ec861465167b4bfe8f6e
Contents?: true
Size: 1.11 KB
Versions: 21
Compression:
Stored size: 1.11 KB
Contents
require "isodoc" require_relative "metadata" require_relative "xref" require_relative "i18n" module IsoDoc module NIST module Init def metadata_init(lang, script, labels) @meta = Metadata.new(lang, script, labels) end def xref_init(lang, script, _klass, labels, options) @xrefs = Xref.new(lang, script, HtmlConvert.new(language: lang, script: script), labels, options) end def i18n_init(lang, script, i18nyaml = nil) @i18n = I18n.new(lang, script, i18nyaml || @i18nyaml) end def fileloc(loc) File.join(File.dirname(__FILE__), loc) end def suppress_biblio_title(node) return false unless node.parent.name == "annex" return false if node.parent.xpath("./references | ./clause | "\ "./terms | ./definitions").size > 1 title1 = node&.at(ns("./title"))&.text&.sub(/^[A-Z]\.(\d+\.)*/, "") return true unless title1 && !title1.empty? title2 = node&.parent&.at(ns("./title"))&.text&.sub(/^.*?— /, "") title1&.casecmp(title2) == 0 end end end end
Version data entries
21 entries across 21 versions & 2 rubygems