plurimath 0.11.11 → 0.11.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bdd1dc4754cef478b4fbc48be08d8b4355d3c1e7efba1f4d30060e022daa04e
4
- data.tar.gz: 8c1a40edf9ae2853b16f28b64d3c61510486b4aad50f8d7367f21053df5be775
3
+ metadata.gz: 4113e509a9cfc9298026571f3c9231f5ffba3ddf9f7307a66fd6335383c4a940
4
+ data.tar.gz: a51115633f6392f2940cb266823a77d660d701867f4c507f6a9e787b84da82b4
5
5
  SHA512:
6
- metadata.gz: 92cf5add4b7acff47121e6a1557fc602f64ef286e57b0611397fe843f5e203722bc65b3eaa489e269aff63a8fb03cfc9a7595f9f9ba899c8cfd9eafb6093d408
7
- data.tar.gz: e69b68ba523da69b9cac43912d52665f0609de0906928bdd59f5a9711971747ef1083a22f84ccf6e269428dd8b65e2d470c3d2cb51f49ba0c69256164f610e04
6
+ metadata.gz: 0450ed469724fc5117b04f24ee0fba4ba91810978943c3c3d08fe6db0ae98bcaa4e5a874a3c41ce05e9671f489941529c34ae6c35f1f5575dd033ddd99987ea2
7
+ data.tar.gz: 9f9a4dc4287cfda6c8f4128ab0e795c6772b1d12bfb3fa9ec56a0a88c4e9c45a7a8fd1941305fdf2cbf7b2a46cbcda879bf500196caa71bddae4ea837d668942
@@ -46,11 +46,16 @@ module Plurimath
46
46
  if value&.include?("ⅇ")
47
47
  attributes[:intent] = Utility.html_entity_to_unicode(value)
48
48
  end
49
- attributes[:rspace] = @options[:rspace] if @options&.key?(:rspace)
50
- mi_tag = ox_element("mi", attributes: attributes)
51
- return mi_tag if ["{:", ":}"].include?(value)
52
-
53
- value ? mi_tag << value : mi_tag
49
+ # `rspace` is an operator attribute: MathML 4 allows it on `mo` (and
50
+ # `mpadded`), never on `mi`. A generic token that carries one must
51
+ # therefore serialize as `mo`, whatever produced it.
52
+ rspace = @options&.[](:rspace)
53
+ attributes[:rspace] = rspace unless rspace.nil?
54
+ tag_name = rspace.nil? ? "mi" : "mo"
55
+ token_tag = ox_element(tag_name, attributes: attributes)
56
+ return token_tag if ["{:", ":}"].include?(value)
57
+
58
+ value ? token_tag << value : token_tag
54
59
  end
55
60
 
56
61
  def to_latex(**)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plurimath
4
- VERSION = "0.11.11"
4
+ VERSION = "0.11.12"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plurimath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.11
4
+ version: 0.11.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.