plurimath 0.8.5 → 0.8.7

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: 4c7657d4a324bfa99582fef0116854399b6edca5fcc2e2a9d9e2ed800555e37b
4
- data.tar.gz: 8fd6706893097300bd4dc924407d8ab34391a58651722b49103375d1e812b7b3
3
+ metadata.gz: '0648b7ffe98de3f19067203ce8f5fc58cfed078c3c78a1b6bde359b9ad7948f0'
4
+ data.tar.gz: bffd63b86cc6c8316dbe47bb6e3eb5fcac26f73b6ffc4622ecd31b1f0229b0d7
5
5
  SHA512:
6
- metadata.gz: 31eaaade52e25f28e1be17f718a07433ff5b890bbb5cf7ebc4f10f669ea2d14ab054518d0fc8867274247f8b7d1cc546f47fa23f4daa98b6e28ccd5b2b81ffd1
7
- data.tar.gz: a63d0eff7b2a95149edec5b4e2b0e9c4c6301ddeec08e068efdbc660f85ba08fac81f7c20cf29f6bcb5769ab97340f6f29bf0696449d3aae3361c143c803beab
6
+ metadata.gz: d0402ad97a49a4374ce6491a6c9a8130645affae8d7f3b15efca9f20f59d476a97609169dac38483f8575806cfb569876aba14fc3ce3edbe881332f53bc8551d
7
+ data.tar.gz: a6729ce0456b3b5d277799cb0315bc5611b428ee7dc62284500783b9fb1d0c401c36f38c4e07403577cb8b3f330114930b774eb0e13b4be70f8f03e9595e36a8
@@ -50,7 +50,6 @@ module Plurimath
50
50
  end
51
51
 
52
52
  def localize_number(num)
53
- num = num.match?(/\./) ? num.to_f : num.to_i
54
53
  localized = localize(BigDecimal(num.to_s))
55
54
  return localized.to_s if @precision.zero?
56
55
 
@@ -3,10 +3,10 @@ module Plurimath
3
3
  module Symbols
4
4
  class Backslash < Symbol
5
5
  INPUT = {
6
- unicodemath: [["&#x5c;"], parsing_wrapper(["backslash"])],
7
- asciimath: [["backslash", "&#x5c;"]],
6
+ unicodemath: [["&#x5c;"], parsing_wrapper(["backslash", "\\"])],
7
+ asciimath: ["backslash", "&#x5c;", "\\"],
8
8
  mathml: ["&#x5c;"],
9
- latex: [["backslash", "&#x5c;"]],
9
+ latex: [["backslash", "&#x5c;"], parsing_wrapper(["\\"])],
10
10
  omml: ["&#x5c;"],
11
11
  html: ["&#x5c;"],
12
12
  }.freeze
@@ -17,7 +17,7 @@ module Plurimath
17
17
  end
18
18
 
19
19
  def to_asciimath
20
- "backslash"
20
+ "\\"
21
21
  end
22
22
 
23
23
  def to_unicodemath
@@ -25,7 +25,7 @@ module Plurimath
25
25
  end
26
26
 
27
27
  def to_mathml_without_math_tag
28
- ox_element("mi") << "&#x5c;"
28
+ ox_element("mo") << "\\"
29
29
  end
30
30
 
31
31
  def to_omml_without_math_tag(_)
@@ -270,7 +270,7 @@ module Plurimath
270
270
  def symbols_hash(lang)
271
271
  @@symbols ||= {}
272
272
  lang_symbols = @@symbols[lang]
273
- return lang_symbols if lang_symbols && lang_symbols.empty?
273
+ return lang_symbols if lang_symbols && !lang_symbols.empty?
274
274
 
275
275
  lang_symbols = {}
276
276
  symbols_files.map do |file_name|
@@ -290,7 +290,7 @@ module Plurimath
290
290
  def parens_hash(lang, skipables: nil)
291
291
  @@parens ||= {}
292
292
  lang_parens = @@parens[lang]
293
- return lang_parens if lang_parens && lang_parens.empty?
293
+ return lang_parens if lang_parens && !lang_parens.empty?
294
294
 
295
295
  lang_parens = {}
296
296
  paren_files.map do |file_name|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plurimath
4
- VERSION = "0.8.5"
4
+ VERSION = "0.8.7"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plurimath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-03 00:00:00.000000000 Z
11
+ date: 2024-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twitter_cldr