mathml2asciimath 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/mathml2asciimath/m2a.rb +2 -3
- data/lib/mathml2asciimath/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0bf53f8a6af53a8d414c8dc9aae0378255d64d69faeb07e359bc0e51c4caaca
|
4
|
+
data.tar.gz: 0174f418f60e0daee2195440e9ba963957671cf54eeb1f95808a8c7c150efbe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b2f948572d56d2291798de4d120a439f349c3dca20c0a7a392fdbfa7e4361c1e7e406e6f151c3db82ad938a4386d3e64b2ccc3237d159263d40555c2f455b88
|
7
|
+
data.tar.gz: e43a9b43057bc6053d5e188463af41dd222ea812a1da32d6a6367cde91463c2295c7cce060f340564c0ef4c9f856af39a677656ff583e04f63e7eaf8ab950756
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mathml2asciimath (0.0.
|
4
|
+
mathml2asciimath (0.0.8)
|
5
5
|
htmlentities (~> 4.3.4)
|
6
6
|
nokogiri (>= 1.10.4)
|
7
7
|
|
@@ -38,7 +38,7 @@ GEM
|
|
38
38
|
method_source (0.9.2)
|
39
39
|
mini_portile2 (2.4.0)
|
40
40
|
nenv (0.3.0)
|
41
|
-
nokogiri (1.10.
|
41
|
+
nokogiri (1.10.7)
|
42
42
|
mini_portile2 (~> 2.4.0)
|
43
43
|
notiffany (0.1.3)
|
44
44
|
nenv (~> 0.1)
|
data/lib/mathml2asciimath/m2a.rb
CHANGED
@@ -164,7 +164,7 @@ module MathML2AsciiMath
|
|
164
164
|
if node.text?
|
165
165
|
return encodechars(HTMLEntities.new.decode(node.text))
|
166
166
|
else
|
167
|
-
case node.name
|
167
|
+
case node.name.sub(/^[^:]*:/, "")
|
168
168
|
when "math"
|
169
169
|
node.elements.each { |n| out << parse(n) }
|
170
170
|
return out
|
@@ -172,7 +172,7 @@ module MathML2AsciiMath
|
|
172
172
|
outarr = []
|
173
173
|
node.children.each { |n| outarr << parse(n) }
|
174
174
|
out = outarr.join("")
|
175
|
-
if %w{mfrac msub munder munderover}.include? node.parent.name
|
175
|
+
if %w{mfrac msub munder munderover}.include? node.parent.name.sub(/^[^:]*:/, "")
|
176
176
|
out = "(#{out})"
|
177
177
|
end
|
178
178
|
return out
|
@@ -268,5 +268,4 @@ module MathML2AsciiMath
|
|
268
268
|
end
|
269
269
|
end
|
270
270
|
end
|
271
|
-
|
272
271
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mathml2asciimath
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|