relaton-bib 1.9.14 → 1.9.15

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: a2b90151346cbb5d5f53a8125ff301d62115f730a521d13b53d363ba6876339a
4
- data.tar.gz: e42718acaca9c77fb47278f03fa5a7f616da09da3ab53d30447e70c45167355b
3
+ metadata.gz: df627fef24296d28c6a6802972a545ce575e89065efc41d07a1783c05fa9d1ad
4
+ data.tar.gz: aff5fe6709c54247e238523cbb49b04137723dc2264e79c054415b1ed29bd706
5
5
  SHA512:
6
- metadata.gz: d84d64063570dcf4e8f4b60a0b5e9df6cca896fa1be79a308e5001099671b1e0a748851d9633d07d2b4ad3ab2318e632d8747cb8f90dfa87d9194153cbbb0cfa
7
- data.tar.gz: 7f7d753a7a88138ecb17ef255d64cee353d43b59339825602cf20ddd5ea76c5d2b096b6e75198112792ba17f8c4e985f85eeab01fee0e892c0b1ec1e1e504f7a
6
+ metadata.gz: e787baf783f229454cbf25423e6ed998476df6d3a4a70654f43c6385be9e74f92913f5526f6d589b5e5c3a23de2123e578109bac9cef79d76734c9c67a6100b1
7
+ data.tar.gz: e1977eb5ab24edd762217c6799319adfb4da51decf4cd9d1cf0660d1e2102eeb568a47a734a9bff40e45748c6fa08efd17f1e094d76fc8285bfb59e100b42637
@@ -82,7 +82,9 @@ module RelatonBib
82
82
  type_match = id&.match(/^(3GPP|W3C|[A-Z]{2,})(?:\.(?=[A-Z])|(?=\d))/)
83
83
  type = self::FLAVOR || (type_match && type_match[1])
84
84
  if id
85
- pid = id.sub(/^(3GPP|W3C|[A-Z]{2,})\.?/, '\1 ')
85
+ /^(?<pref>I-D|3GPP|W3C|[A-Z]{2,})\.?(?<num>.+)/ =~ id
86
+ num.sub!(/^-?0+/, "") if %w[RFC BCP FYI STD].include?(pref)
87
+ pid = pref ? "#{pref} #{num}" : id
86
88
  ret << DocumentIdentifier.new(type: type, id: pid)
87
89
  end
88
90
  %w[anchor docName number].each do |atr|
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.9.14".freeze
2
+ VERSION = "1.9.15".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.14
4
+ version: 1.9.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-29 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug