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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97746384a189f102b2ae9fb98ed39cd8371297d4f8a0567230137f7a1c7843c0
4
- data.tar.gz: ab24fb45d0ed0622972b2e6e5bb9426f236cfdf652ebdabbe9c4a0cc74cbeefb
3
+ metadata.gz: 014c86a7c0add074f682133c9612482a5ec6d48e6bd84d261efe1bbf01492434
4
+ data.tar.gz: 7af840d88c2963846652a8baaf5b3a3243fd833becda6315200749a438a778a8
5
5
  SHA512:
6
- metadata.gz: a76a86bff1df66a467f5d40e60506709bb9fb2f003f6d06c121bab14384394f97c46e89b2130d86d14c49e82e8ceb7e9c155805604330c07ce3351bd19a4aa53
7
- data.tar.gz: ddeb932fdd1f3c55a3411a7349180f6f58f23e5048acb7d81c0193b9ae991c04c9ba1555c8e3e459e60bf8230bd310c9d0a0c2c5684e98f16186b086016d7b54
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
@@ -1,5 +1,4 @@
1
1
  require "uuidtools"
2
- require "asciimath"
3
2
  require "htmlentities"
4
3
  require "nokogiri"
5
4
  require "fileutils"
@@ -1,5 +1,4 @@
1
1
  require "uuidtools"
2
- require "asciimath"
3
2
  require "htmlentities"
4
3
  require "nokogiri"
5
4
 
data/lib/html2doc/math.rb CHANGED
@@ -1,14 +1,13 @@
1
1
  require "uuidtools"
2
- require "asciimath"
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 = AsciiMath::MathMLBuilder.new(msword: true).append_expression(
10
- AsciiMath.parse(@c.decode(expr)).ast,
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