isodoc 3.7.30 → 3.7.31

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: dddffeb5a346bb5ee5bd7305e136c9bb6fe862a6376dfe5b505ec7efca529673
4
- data.tar.gz: 28e3674eadff973881565f037f9849f0935e8521457fc484d9fe0921c65989c4
3
+ metadata.gz: a8e4d4a5a156cf057d376be69d387cbb1fe9eb28755a8b12f2338c04862db883
4
+ data.tar.gz: 6406530cb1dc50b3e376aeb7a45206abeae9a79e174d8e74bcf49a36d45425e9
5
5
  SHA512:
6
- metadata.gz: 3f5dcb14793af322fede54da150345ddbb768d9de8abe9054cb10430468fb05fdf0eb780bb536e93349b84b717d51b312b2471f54ed915388bcb8597770365f2
7
- data.tar.gz: 9a2cab634c510593c6fd0133f44e43fb9de57babf8eb0150d85df4c73bd0d30df272dabafcc666a4cc6126bc6371b28e1d892c76ab7b5cc054659c4a4ce0b3fe
6
+ metadata.gz: aa47f282a796bf6fba8798b16e15710f66bb753c6b40afbabeea7d42a309a7e869a52b4edb50ae164aaee4b682e20ec28f0164877579083dae05ad66b2652af7
7
+ data.tar.gz: 9b17b032e45a84487d2f28a3e02a62ad84f34eb5ac7e18d5fd391d49a63518254318d3c4784345db0958ad142abad4f1990d507cd95d77bd0469e0a3b59dfb75
data/isodoc.gemspec CHANGED
@@ -48,7 +48,7 @@ Gem::Specification.new do |spec|
48
48
  spec.add_dependency "mn-requirements", "~> 0.5.0"
49
49
  # rhoella-cldr is the sealed CLDR data package rhoella reads; both are
50
50
  # declared because the spellout paths address the package directly
51
- # (twitter_cldr retirement, metanorma/isodoc#949)
51
+ # (CLDR library retirement, metanorma/isodoc#949)
52
52
  spec.add_dependency "rhoella", "~> 0.1"
53
53
  spec.add_dependency "rhoella-cldr", "~> 0.1"
54
54
  spec.add_dependency "roman-numerals"
@@ -31,7 +31,7 @@ module IsoDoc
31
31
  index1_cleanup(docxml)
32
32
  end
33
33
 
34
- # Ordering semantics changed with the twitter_cldr retirement (owner
34
+ # Ordering semantics changed with the CLDR library retirement (owner
35
35
  # directive 2026-11-30, documented in rhoella/rhoella#24 §5 and
36
36
  # metanorma/isodoc#949): entries sort by their NFD-normalized form,
37
37
  # tie-broken by the raw string. Deterministic, normalization-stable,
@@ -133,9 +133,9 @@ module IsoDoc
133
133
  index.keys.sort.each_with_object({}) do |k, v|
134
134
  # Index-term bucket key: the first letter, upcased and
135
135
  # NFD-decomposed so accented letters fold onto their base letter
136
- # ("É" and "E" share a bucket). Replaces the twitter_cldr
137
- # transliterate monkey patch retired with the twitter_cldr
138
- # dependency (rhoella/rhoella#24 §5, metanorma/isodoc#949);
136
+ # ("É" and "E" share a bucket). Replaces the CLDR transliterate
137
+ # monkey patch retired with the CLDR library retirement
138
+ # (rhoella/rhoella#24 §5, metanorma/isodoc#949);
139
139
  # letters that do not decompose to ASCII keep their own bucket.
140
140
  letter = sortable(k)[0].upcase.unicode_normalize(:nfd)[0]
141
141
  v[letter] ||= {}
@@ -10,15 +10,14 @@ module IsoDoc
10
10
  locale = @lang.to_sym
11
11
  @numfmt = Plurimath::NumberFormatter
12
12
  .new(locale, localize_number: @localizenumber,
13
- localizer_symbols: twitter_cldr_localiser_symbols)
13
+ localizer_symbols: number_formatter_symbols)
14
14
  docxml.xpath("//m:math", MATHML).each do |f| # rubocop:disable Style/CombinableLoops
15
15
  f.parent&.parent&.name == "fmt-stem" or next
16
16
  mathml1(f, locale)
17
17
  end
18
18
  end
19
19
 
20
- # symbols is merged into
21
- # TwitterCldr::DataReaders::NumberDataReader.new(locale).symbols
20
+ # symbols is merged into the Plurimath formatter's locale symbols
22
21
  def localize_maths(node, locale)
23
22
  node.xpath(".//m:mn", MATHML).each do |x|
24
23
  fmt = x["data-metanorma-numberformat"]
@@ -101,7 +100,7 @@ module IsoDoc
101
100
  end
102
101
 
103
102
  def explicit_number_formatter_cfg(num, fmt)
104
- symbols = twitter_cldr_localiser_symbols.dup.transform_values do |v|
103
+ symbols = number_formatter_symbols.dup.transform_values do |v|
105
104
  v.is_a?(String) ? HTMLEntities.new.decode(v) : v
106
105
  end.merge(fmt)
107
106
  symbols = large_notation_fmt(symbols, num.text)
@@ -142,7 +141,7 @@ module IsoDoc
142
141
  def num_precision(num)
143
142
  precision = nil
144
143
  /\.(?!\d+e)/.match?(num) and
145
- precision = twitter_cldr_localiser_symbols[:precision] ||
144
+ precision = number_formatter_symbols[:precision] ||
146
145
  # [^.]* excludes the delimiter itself, preventing polynomial
147
146
  # backtracking on strings with multiple dots.
148
147
  num.sub(/\A[^.]*\./, "").size
@@ -152,7 +151,7 @@ module IsoDoc
152
151
  def num_totaldigits(num, base = 10)
153
152
  totaldigits = nil
154
153
  /\.(?=\d+e)/.match?(num) and
155
- totaldigits = twitter_cldr_localiser_symbols[:significant] ||
154
+ totaldigits = number_formatter_symbols[:significant] ||
156
155
  num_totaldigits_compute(num, base)
157
156
  totaldigits
158
157
  end
@@ -200,14 +199,12 @@ module IsoDoc
200
199
  end
201
200
 
202
201
  # Number-symbol injection hook, consulted by the Plurimath formatter
203
- # wiring above. Named for the twitter_cldr heritage of the option
204
- # names, but it is NOT twitter_cldr: it is a plain-hash override
205
- # point that metanorma-iso (presentation_xml_convert.rb) overrides
206
- # with ISO's NBSP group separator and comma decimal mark, and the
207
- # numberformat specs stub. Retained through the twitter_cldr
208
- # retirement (metanorma/isodoc#949); renaming it would break the
209
- # metanorma-iso override silently.
210
- def twitter_cldr_localiser_symbols
202
+ # wiring above: a plain-hash override point passed to Plurimath
203
+ # as `localizer_symbols:`. metanorma-iso (presentation_xml_convert.rb)
204
+ # overrides it with ISO's NBSP group separator and comma decimal
205
+ # mark, and the numberformat specs stub it. Renaming it again would
206
+ # break the metanorma-iso override silently.
207
+ def number_formatter_symbols
211
208
  {}
212
209
  end
213
210
 
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.7.30".freeze
2
+ VERSION = "3.7.31".freeze
3
3
  end
@@ -172,8 +172,8 @@ module IsoDoc
172
172
  num.nil? and return num
173
173
  case @style
174
174
  when :roman then RomanNumerals.to_roman(num)
175
- # ja spellout-cardinal is byte-identical between twitter_cldr and
176
- # rhoella (the twitter_cldr retirement equivalence gate)
175
+ # ja spellout-cardinal is byte-identical between the previous
176
+ # CLDR engine and rhoella (the retirement equivalence gate)
177
177
  when :japanese then Rhoella.spellout(num, locale: "ja")
178
178
  else num
179
179
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.30
4
+ version: 3.7.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-30 00:00:00.000000000 Z
11
+ date: 2026-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64