isodoc 3.6.0 → 3.6.2

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: a7090dc22f60e48ff426569497b98e6269308ad72b4a7198fbe08ee42a579944
4
- data.tar.gz: b5843c03c85e957088107f0a6b30351f67c46117b2bc461c6a95739471077eb3
3
+ metadata.gz: 2bf1ffcc456d731a2c304e57a434c843fb15c35160b1a9f986edd708d6c69778
4
+ data.tar.gz: ac599e110c10a0ea9937d2068f01feff1cace361da16668a2effb79d01a8e71f
5
5
  SHA512:
6
- metadata.gz: d0dac37b3d8c895bd2879f877231604b1ed71a350efc3c45bcc514dab06e3360b8d4c5df044412d90a82984639d02413cb9db15b1e3168e42a28d8a48300f4ab
7
- data.tar.gz: 3f83a6ad5fe77b8fd81d644f8edc56a0dd5a9d24c19202a561ece45c7c3d1d2109a6da4e427a45c3a6d22bb36836d248662765775e605f83a84e2e93e4ed47f6
6
+ metadata.gz: a10380f99ba7cb208b32ef3c4631e5ca4cb41173c77c925d069cb17c72dcfd4c55bdd0a63a23080ecb0c0d6783e08b2e351bfc694c7280ade2b960779da8c1be
7
+ data.tar.gz: b394e8f2e6e78fe1f1c00b9df1f1d233b053118daee4e70e6927009725afddb851031d47ed52272cdf09a8931d6710e47b83b478b99c97725c4a57e21f766356
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  # Auto-generated by Cimas: Do not edit it manually!
2
2
  # See https://github.com/metanorma/cimas
3
3
  inherit_from:
4
- - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
5
 
6
6
  # local repo-specific modifications
7
7
  # ...
@@ -98,7 +98,7 @@ module IsoDoc
98
98
  def empty_tags(html)
99
99
  void_elements = %w[area base br col embed hr img input link meta
100
100
  source track wbr wrapblock]
101
- html.gsub(%r{<([\w:]+)((?>"[^"]*"|'[^']*'|[^>/])*)\s*/>}) do
101
+ html.gsub(%r{<([\w:.-]+)((?>"[^"]*"|'[^']*'|[^>/])*)\s*/>}) do
102
102
  if void_elements.include?($1)
103
103
  $&
104
104
  else
@@ -23,21 +23,23 @@ module IsoDoc
23
23
  end
24
24
 
25
25
  def monthyr(isodate)
26
- m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)/.match isodate
27
- return isodate unless m && m[:yr] && m[:mo]
28
-
29
- l10n("#{months[m[:mo].to_sym]} #{m[:yr]}")
26
+ out = IsoDoc::ExtendedDateFormatter.format_iso_date(
27
+ isodate,
28
+ lang: @lang,
29
+ year_month: "%B %Y",
30
+ full: "%B %Y",
31
+ )
32
+ out == isodate ? out : l10n(out)
30
33
  end
31
34
 
32
35
  def MMMddyyyy(isodate)
33
- isodate.nil? and return nil
34
-
35
- arr = isodate.split("-")
36
- arr.size == 1 && (/^\d+$/.match isodate) and
37
- return Date.new(*arr.map(&:to_i)).strftime("%Y")
38
- arr.size == 2 and
39
- return Date.new(*arr.map(&:to_i)).strftime("%B %Y")
40
- Date.parse(isodate).strftime("%B %d, %Y")
36
+ IsoDoc::ExtendedDateFormatter.format_iso_date(
37
+ isodate,
38
+ lang: @lang,
39
+ year: "%Y",
40
+ year_month: "%B %Y",
41
+ full: "%B %d, %Y",
42
+ )
41
43
  end
42
44
 
43
45
  def bibdate(isoxml, _out)
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.6.0".freeze
2
+ VERSION = "3.6.2".freeze
3
3
  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.6.0
4
+ version: 3.6.2
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-05-11 00:00:00.000000000 Z
11
+ date: 2026-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64