latexmath 0.1.2 → 0.1.3

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: 963fd3a64bdddcd86d8de55e494d6d5d70bb5ed7bd9ffc1569633ac66154b46a
4
- data.tar.gz: 970e577a94ed4d819dbdeaa3577562b5f1b10dbfd914d34491fd14d6fa5a5c3f
3
+ metadata.gz: 81fc79f8e8badb13f6f9a8010b81fa23cc6d610ecb2f5b61d88c5c4ef2c48e52
4
+ data.tar.gz: adc01e90660d4b963a5ed955bc10e5972a399b37a94fd72eed607c48bd5cc5fa
5
5
  SHA512:
6
- metadata.gz: f1d80856d8fbd79c7b2d0da2ae66344175ec47ee2b5b803dfd794c0e7fc7557c9596ebd426426ca5b7d4725e85b1616c9b71bff8e1b98ab0a4182fa265ac9bf0
7
- data.tar.gz: 83f0855a3c719039ab1efb642f428416307a532c2bd4c237c779930af5a6bc82823cb86d7b3ec69e2f8366bf47f79ff57ffa57eeecc504cb2c1ae1a6bfe72d5a
6
+ metadata.gz: 4cd75a8fcf7e4eac4cf4b29fffa12ac0d75f178c9e3307e4f8b5d31dc993bc903ceefda271c747e9206f081fc7c62cd0ddb3b28c480e40e7f0cbc85bd06dc814
7
+ data.tar.gz: 19714d6f9fdfbdd5c1bb90764ae4c7590e386b895042b27f671bb306137f03efa133ac2e37edd63cfd680e08b1edfed9fdee1446922f5fa2eeef8f89b1e71e75
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- latexmath (0.1.2)
4
+ latexmath (0.1.3)
5
5
  htmlentities (~> 4.3)
6
6
  ox (~> 2.13)
7
7
 
@@ -12,7 +12,7 @@ module Latexmath
12
12
 
13
13
  classify_subgroup(@aggregate, mrow)
14
14
 
15
- Ox.dump(@doc)
15
+ Ox.dump(@doc, indent: -1)
16
16
  end
17
17
 
18
18
  private
@@ -9,6 +9,11 @@ module Latexmath
9
9
  exp << token
10
10
  end
11
11
 
12
+ if exp.first == '\[' && exp.last == '\]'
13
+ exp.pop
14
+ exp.shift
15
+ end
16
+
12
17
  exp
13
18
  end
14
19
 
@@ -24,10 +29,8 @@ module Latexmath
24
29
  end
25
30
  elsif scan(/{\\bf [^}]+}/)
26
31
  matches = matched.match(/{\\bf ([^}]+)}/)
27
- symbol = "\\mathbf{#{matches[1]}}"
28
- if Latexmath::Symbol.get(symbol)
29
- "&#x#{Latexmath::Symbol.get(symbol)};"
30
- end
32
+ symbol = Latexmath::Symbol.get("\\mathbf{#{matches[1]}}")
33
+ "&#x#{symbol};" if symbol
31
34
  elsif scan(/\\\\\[\d+mm\]/)
32
35
  '\\\\' # matched
33
36
  elsif scan(/\\mbox{[^\}]+}/)
@@ -1,3 +1,3 @@
1
1
  module Latexmath
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: latexmath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.