html2doc 1.4.5 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/html2doc.gemspec +1 -1
- data/lib/html2doc/base.rb +0 -1
- data/lib/html2doc/lists.rb +0 -1
- data/lib/html2doc/math.rb +3 -4
- data/lib/html2doc/mathml2omml.xsl +3822 -0
- data/lib/html2doc/version.rb +1 -1
- metadata +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 014c86a7c0add074f682133c9612482a5ec6d48e6bd84d261efe1bbf01492434
|
4
|
+
data.tar.gz: 7af840d88c2963846652a8baaf5b3a3243fd833becda6315200749a438a778a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcc3425f023a13639f57728cfb796da4b56e51b99c700f1251668609e44217d2c9131c063c5526621e6ec6be07274b7e97d841e43a76c9900d6898c37d82ddf2
|
7
|
+
data.tar.gz: 0c28ae213c04e4d3d9bfe01cbcd9455773e584bf98a0067c85403d87ac19e7cec38ce02bcf68762d9701e6c180f692b19ca69c1b45aa28d95d78be57e99d42f2
|
data/html2doc.gemspec
CHANGED
@@ -26,12 +26,12 @@ Gem::Specification.new do |spec|
|
|
26
26
|
end
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
28
28
|
|
29
|
-
spec.add_dependency "asciimath", "~> 2.0.2"
|
30
29
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
31
30
|
spec.add_dependency "image_size", ">= 3.2.0"
|
32
31
|
spec.add_dependency "mime-types"
|
33
32
|
spec.add_dependency "nokogiri", "~> 1.13"
|
34
33
|
spec.add_dependency "plane1converter", "~> 0.0.1"
|
34
|
+
spec.add_dependency "plurimath"
|
35
35
|
spec.add_dependency "thread_safe"
|
36
36
|
spec.add_dependency "uuidtools"
|
37
37
|
|
data/lib/html2doc/base.rb
CHANGED
data/lib/html2doc/lists.rb
CHANGED
data/lib/html2doc/math.rb
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
require "uuidtools"
|
2
|
-
require "
|
2
|
+
require "plurimath"
|
3
3
|
require "htmlentities"
|
4
4
|
require "nokogiri"
|
5
5
|
require "plane1converter"
|
6
6
|
|
7
7
|
class Html2Doc
|
8
8
|
def asciimath_to_mathml1(expr, retain_asciimath)
|
9
|
-
ret =
|
10
|
-
|
11
|
-
).to_s.gsub(/<math>/, "<math xmlns='http://www.w3.org/1998/Math/MathML'>")
|
9
|
+
ret = Plurimath::Math.parse(HTMLEntities.new.decode(expr), "asciimath").to_mathml
|
10
|
+
.gsub(/<math>/, "<math xmlns='http://www.w3.org/1998/Math/MathML'>")
|
12
11
|
retain_asciimath and
|
13
12
|
ret += "<asciimath>#{@c.encode(@c.decode(expr), :basic)}</asciimath>"
|
14
13
|
ret
|