kramdown-rfc2629 1.5.1 → 1.5.2

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: 296e6b41d770f71cc7266daefdbef48425bd7b050ae3be467badabf1f2f8453d
4
- data.tar.gz: 12ca2cd06a9d6911f4f4db728210909ccb23a44563c4ae8ac5beaaf044fb550e
3
+ metadata.gz: a4b5c45b8847c6578542b8920d23c017bd22ef3bf35fe005d871c8a305738219
4
+ data.tar.gz: 2f2ff22d21077a464373dfe592af271457e1f2cfec8c4f353da92e0ffd559e01
5
5
  SHA512:
6
- metadata.gz: b8adf6c1c27f37b30468b6c593f3faa334adfba8953f99160ac842bfcc98bb7dde0ef02e36ea65450b9ea519ac46a200e5631c9a3bd5832296ef78b7aa18fb8a
7
- data.tar.gz: ee84d6769775ea513fea5240bdf1d552f7a724213840363d76a0510a53d9cae8ae56dd2de342f6b1540f5e2c5f9fe085b53ad7e4ca9ccd15ee598798f7a2be65
6
+ metadata.gz: b9f8b2a133cfc9e511804df4bd7be41ed0b59203a2997d277fb888f2b7b3ac494988f8bb7a9ba084c4ebe7253a141daef4aa8f9c4147329d9a19ba1bdc62a649
7
+ data.tar.gz: 562538aacef3d53eed6fc976d08e78d72838c8c28ea29a9a47fa65652ebaed34d05fff26bbba1570161740431aa9e9bef487083216ab7833db8ad1e93c0045a3
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.5.1'
3
+ s.version = '1.5.2'
4
4
  s.summary = "Kramdown extension for generating RFC 7749 XML."
5
5
  s.description = %{An RFC7749 (XML2RFC) generating backend for Thomas Leitner's
6
6
  "kramdown" markdown parser. Mostly useful for RFC writers.}
@@ -57,17 +57,35 @@ module KramdownRFC
57
57
  aups
58
58
  end
59
59
 
60
+ # The below anticipates the "postalLine" changes.
61
+ # If a postalLine is used (abbreviated "postal" in YAML),
62
+ # non-postalLine elements are appended as further postalLines.
63
+ # This prepares for how "country" is expected to be handled
64
+ # specially with the next schema update.
65
+ # So an address is now best keyboarded as:
66
+ # postal:
67
+ # - Foo Street
68
+ # - 28359 Bar
69
+ # country: Germany
70
+
60
71
  PERSON_ERB = <<~ERB
61
72
  <<%= element_name%> <%=aups.attrs("initials", "surname", "fullname=name", "role")%>>
62
73
  <%= aups.ele("organization=org", aups.attrs("abbrev=orgabbrev",
63
74
  *[$options.v3 && "ascii=orgascii"]), "") %>
64
75
  <address>
65
- <% postal = %w{street city region code country}.select{|gi| aups.has(gi)}
66
- if postal != [] -%>
76
+ <% postal_elements = %w{extaddr pobox street cityarea city region code sortingcode country postal}.select{|gi| aups.has(gi)}
77
+ if postal_elements != [] -%>
67
78
  <postal>
68
- <% postal.each do |gi| -%>
79
+ <% if pl = postal_elements.delete("postal") -%>
80
+ <%= aups.ele("postalLine=postal") %>
81
+ <% postal_elements.each do |gi| -%>
82
+ <%= aups.ele("postalLine=" << gi) %>
83
+ <% end -%>
84
+ <% else -%>
85
+ <% postal_elements.each do |gi| -%>
69
86
  <%= aups.ele(gi) %>
70
87
  <% end -%>
88
+ <% end -%>
71
89
  </postal>
72
90
  <% end -%>
73
91
  <% %w{phone facsimile email uri}.select{|gi| aups.has(gi)}.each do |gi| -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-rfc2629
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2021-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown