html2doc 1.4.5 → 1.5.0
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 +4 -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: a7fc9d0eb6cd4bb7611c145794fe61c8d085b8ece41978e1b76e9c0124e6d4ed
|
4
|
+
data.tar.gz: 48f0e7bb2c806c702f956a68044d94e0cebdca9d9404acca1ad88099bae332e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2236ee4ee2447e3bcedfffbc226dcc605fac292247c1b46fc0ea411d90e66b8a99eb1647706c083cb23ff07f019dc8e752565aa3c27c7526d0d28ac5e4ad9307
|
7
|
+
data.tar.gz: 29e49ceed2cef4fbd1d3b233fe1d06137eb43ad54595690ee6b9dffeceed4d5fd050316adebe2c817e344bb2214a3251cbf5baee142e446e87841386060cd951
|
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,14 @@
|
|
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
|
-
|
10
|
-
|
11
|
-
|
9
|
+
warn expr
|
10
|
+
ret = Plurimath::Math.parse(HTMLEntities.new.decode(expr), "asciimath").to_mathml
|
11
|
+
.gsub(/<math>/, "<math xmlns='http://www.w3.org/1998/Math/MathML'>")
|
12
12
|
retain_asciimath and
|
13
13
|
ret += "<asciimath>#{@c.encode(@c.decode(expr), :basic)}</asciimath>"
|
14
14
|
ret
|