omml 0.2.4 → 0.2.5

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: 3ce14e76214616c5ed42526770f0ebddd8d493060751e43beb120ee82f387643
4
- data.tar.gz: 0d9400a36a1f5bb043181ecbfdfcc32df67e6e94ed11c93bbc2a69ec92f907ec
3
+ metadata.gz: 3b24378676d74255e2c5b31b6353c61c360938432b345a978b53e01bdc5c9ac5
4
+ data.tar.gz: '028f9311afc57c735cfff5bf2ee7c50e93323d41842b2ea1a0e8fc00bea229e4'
5
5
  SHA512:
6
- metadata.gz: 0033d96f7a981e5308c2860bc6e310e06dbf2d92c5c5d5f916e8d850ee0b5e4cf5f7476b168ca014804803e6968b1bb8d62d712df0503e8b842e49fe14b346a9
7
- data.tar.gz: aa6776106eb171d78148163381e37dfe289acc95b0eb4119aa3e9ec4c2c3e68298a69d58ab2f49ba81d8d6574c73e1fdc8522a0da50e0bc3ba7920cc18987f68
6
+ metadata.gz: 501418b53bde09ad38a769724c61cb10c4b9174fabc95e0ed6261a836a7d978ca638b10bd445292eba1d2830010fe4d1742da7df85df88a37caed485d4a57cb4
7
+ data.tar.gz: d039132696d7c11bed264fbb0d090a779063f5be22b68bfc7a6d273a6908f9895f6296995490956e0fef953af0f2f88e723509ff3506659f3f57cc921c6fb9a2
@@ -14,6 +14,7 @@ module Omml
14
14
  element "CT_R"
15
15
 
16
16
  namespace Omml::Namespace
17
+ ordered
17
18
 
18
19
  sequence do
19
20
  map_element :rPr, to: :r_pr
@@ -6,9 +6,13 @@ module Omml
6
6
  # contributes only the `t` element (CT_Text) inside a math run; all
7
7
  # other run inner content (br, cr, tab, delText, etc.) belongs to
8
8
  # the WordprocessingML namespace via EGWordRunInnerContent.
9
+ #
10
+ # CT_R's choice has maxOccurs="unbounded", so every attribute here is
11
+ # a collection — multiple <m:t> can appear interleaved with
12
+ # wordprocessing elements (<m:t>before<w:br/><m:t>after</m:t>).
9
13
  class EGRunInnerContent < Base
10
14
  choice(min: 1, max: 1) do
11
- attribute :t, :ct_text
15
+ attribute :t, :ct_text, collection: true
12
16
  end
13
17
 
14
18
  xml do
@@ -6,45 +6,44 @@ module Omml
6
6
  # <xsd:group ref="w:EG_RunInnerContent" /> in shared-math.xsd.
7
7
  #
8
8
  # Every element here belongs to the WordprocessingML namespace regardless
9
- # of its containing parent. Per the global rule "define your own types",
10
- # Omml owns these wordprocessing stubs so the gem is self-contained;
11
- # consumers (e.g. Uniword) substitute their own wordprocessing classes
12
- # via the register substitution mechanism.
9
+ # of its containing parent. CT_R's choice has maxOccurs="unbounded", so
10
+ # every attribute here is a collection multiple <w:br/> can appear
11
+ # interleaved with math text and other wordprocessing elements.
13
12
  class EGWordRunInnerContent < Base
14
13
  choice(min: 1, max: 1) do
15
- attribute :br, :ct_br
16
- attribute :del_text, :ct_wordprocessing_text
17
- attribute :instr_text, :ct_wordprocessing_text
18
- attribute :del_instr_text, :ct_wordprocessing_text
19
- attribute :no_break_hyphen, :ct_wordprocessing_empty
20
- attribute :soft_hyphen, :ct_wordprocessing_empty, collection: 0..1
21
- attribute :day_short, :ct_wordprocessing_empty, collection: 0..1
22
- attribute :month_short, :ct_wordprocessing_empty, collection: 0..1
23
- attribute :year_short, :ct_wordprocessing_empty, collection: 0..1
24
- attribute :day_long, :ct_wordprocessing_empty, collection: 0..1
25
- attribute :month_long, :ct_wordprocessing_empty, collection: 0..1
26
- attribute :year_long, :ct_wordprocessing_empty, collection: 0..1
27
- attribute :annotation_ref, :ct_wordprocessing_empty, collection: 0..1
28
- attribute :footnote_ref, :ct_wordprocessing_empty, collection: 0..1
29
- attribute :endnote_ref, :ct_wordprocessing_empty, collection: 0..1
30
- attribute :separator, :ct_wordprocessing_empty, collection: 0..1
14
+ attribute :br, :ct_br, collection: true
15
+ attribute :del_text, :ct_wordprocessing_text, collection: true
16
+ attribute :instr_text, :ct_wordprocessing_text, collection: true
17
+ attribute :del_instr_text, :ct_wordprocessing_text, collection: true
18
+ attribute :no_break_hyphen, :ct_wordprocessing_empty, collection: true
19
+ attribute :soft_hyphen, :ct_wordprocessing_empty, collection: true
20
+ attribute :day_short, :ct_wordprocessing_empty, collection: true
21
+ attribute :month_short, :ct_wordprocessing_empty, collection: true
22
+ attribute :year_short, :ct_wordprocessing_empty, collection: true
23
+ attribute :day_long, :ct_wordprocessing_empty, collection: true
24
+ attribute :month_long, :ct_wordprocessing_empty, collection: true
25
+ attribute :year_long, :ct_wordprocessing_empty, collection: true
26
+ attribute :annotation_ref, :ct_wordprocessing_empty, collection: true
27
+ attribute :footnote_ref, :ct_wordprocessing_empty, collection: true
28
+ attribute :endnote_ref, :ct_wordprocessing_empty, collection: true
29
+ attribute :separator, :ct_wordprocessing_empty, collection: true
31
30
  attribute :continuation_separator, :ct_wordprocessing_empty,
32
- collection: 0..1
33
- attribute :sym, :ct_sym, collection: 0..1
34
- attribute :pg_num, :ct_wordprocessing_empty, collection: 0..1
35
- attribute :cr, :ct_wordprocessing_empty, collection: 0..1
36
- attribute :tab, :ct_wordprocessing_empty, collection: 0..1
37
- attribute :object, :ct_object
38
- attribute :pict, :ct_picture
39
- attribute :fld_char, :ct_fld_char
40
- attribute :ruby, :ct_ruby
41
- attribute :footnote_reference, :ct_ftn_edn_ref
42
- attribute :endnote_reference, :ct_ftn_edn_ref
43
- attribute :comment_reference, :ct_markup
44
- attribute :drawing, :ct_drawing
45
- attribute :ptab, :ct_p_tab, collection: 0..1
31
+ collection: true
32
+ attribute :sym, :ct_sym, collection: true
33
+ attribute :pg_num, :ct_wordprocessing_empty, collection: true
34
+ attribute :cr, :ct_wordprocessing_empty, collection: true
35
+ attribute :tab, :ct_wordprocessing_empty, collection: true
36
+ attribute :object, :ct_object, collection: true
37
+ attribute :pict, :ct_picture, collection: true
38
+ attribute :fld_char, :ct_fld_char, collection: true
39
+ attribute :ruby, :ct_ruby, collection: true
40
+ attribute :footnote_reference, :ct_ftn_edn_ref, collection: true
41
+ attribute :endnote_reference, :ct_ftn_edn_ref, collection: true
42
+ attribute :comment_reference, :ct_markup, collection: true
43
+ attribute :drawing, :ct_drawing, collection: true
44
+ attribute :ptab, :ct_p_tab, collection: true
46
45
  attribute :last_rendered_page_break, :ct_wordprocessing_empty,
47
- collection: 0..1
46
+ collection: true
48
47
  end
49
48
 
50
49
  xml do
data/lib/omml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Omml
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.