Method: IsoDoc::Function::Cleanup#symbol_key

Defined in:
lib/isodoc/function/cleanup.rb

#symbol_key(x) ⇒ Object

We assume AsciiMath is being used in the terms & definitions. Indices sort after letter but before any following letter (x, x_m, x_1, xa); we use colon to force that sort order. Numbers sort after letters; we use thorn to force that sort order.



158
159
160
161
# File 'lib/isodoc/function/cleanup.rb', line 158

def symbol_key(x)
  HTMLEntities.new.decode(x.text).gsub(/_/, ":").gsub(/`/, "").
    gsub(/[0-9]+/, "þ\\1")
end