Method: IsoDoc::IEEE::Init#std_docid_semantic_full

Defined in:
lib/isodoc/ieee/init.rb

#std_docid_semantic_full(ident) ⇒ Object

AGENCY+ TYPE NUMBER YEAR



50
51
52
53
54
55
56
57
58
59
# File 'lib/isodoc/ieee/init.rb', line 50

def std_docid_semantic_full(ident)
  m = ident.match(%r{(?<text>[^0-9]+\p{Zs})
                  (?<num>[0-9]+[^:]*)
                  (?:[:](?<yr>(?:19|20)\d\d))?}x)
  m or return ident
  ret = std_docid_sdo(m[:text]) +
    "<span class='std_docNumber'>#{m[:num]}</span>"
  m[:yr] and ret += ":<span class='std_year'>#{m[:yr]}</span>"
  ret.gsub(%r{</span>(\p{Zs}+)<}, "\\1</span><")
end