Method: IsoDoc::PresentationXMLConvert#maths_just_numeral

Defined in:
lib/isodoc/presentation_function/math.rb

#maths_just_numeral(node) ⇒ Object



149
150
151
152
153
154
155
156
157
# File 'lib/isodoc/presentation_function/math.rb', line 149

def maths_just_numeral(node)
  mn = node.at(".//m:mn", MATHML).children.text
    .sub(/\^([0-9+-]+)$/, "<sup>\\1</sup>")
  #if node.parent.parent.name == "stem"
    #node.replace(mn)
  #else
    node.replace(mn)
  #end
end