Sha256: 40239f98154964685012e251a0722536cbe25400606ecebc1fc05bcb9715959e

Contents?: true

Size: 264 Bytes

Versions: 4

Compression:

Stored size: 264 Bytes

Contents

require "mathml2asciimath"

STDIN.set_encoding("UTF-8")
while a = gets
  matches = a.split(%r{(<math.*?</math>)})
  out = ""
  matches.each do |x|
    if /<math/.match? x
      out += MathML2AsciiMath.m2a(x)
    else
      out += x
    end
  end
  print out
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mathml2asciimath-0.0.4 bin/m2a.rb
mathml2asciimath-0.0.3 bin/m2a.rb
mathml2asciimath-0.0.2 bin/m2a.rb
mathml2asciimath-0.0.1 bin/m2a.rb