kramdown-rfc2629 1.5.14 → 1.5.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: 3097408dcedb58eab67f2de242d7ba51f8e62e82199e9da00b6a68ca0917c3dc
4
- data.tar.gz: fbcac44963fb8a7ce2df22060e624410e8f7df4c439d2e7cdcc1fcb760f3b1c4
3
+ metadata.gz: 1a7de9b6c78edf74415c185732e4b41a2d5685b07968bd187ce0948ea6dfd607
4
+ data.tar.gz: 52abd5a775d5c9922531b199fc957fbfe645621b4db3b59a624b0940ec328bf9
5
5
  SHA512:
6
- metadata.gz: b79053e9e4a368ece939ef8a3cca6c8e72826dd0e35bee10a4cf1548f4e5b72d38fdf680a0ae33b17c33c24ab87335addd401d3df2d60b34476ccfb4f592a501
7
- data.tar.gz: 0d1a39fbb8e26a5513deca8fdf9c844aed56cdcb27c02ab6695251bfadfbdd47721b0f3a90a2755171eb7eb58dc98629b57f8e528e0c7c00005f640a1d74bd6e
6
+ metadata.gz: 6a10a5fa3678b60ac5e1fa56ca42ef38529ff577e1a206c87784d9afb53d73af853ba16fbf0ec233152c55614b0ee9a22b40e332c0fd2b14bf7371333359baf7
7
+ data.tar.gz: 4dd3ef2b8698068f39b3e2c032f3bd76d281ac8fadb46820867b266339bee9aa86787eb0a60b72d853f03b33f0190256c4125fdf8950d8a877106dbdb855e6e3
@@ -42,6 +42,31 @@
42
42
 
43
43
  </abstract>
44
44
 
45
+ <% if $options.v3 -%>
46
+ <% venue = ps[:venue] -%>
47
+ <% if venue -%>
48
+ <% venue = KramdownRFC::ParameterSet.new(venue) -%>
49
+ <note title="Discussion Venues" removeInRFC="true">
50
+ <% if mail = venue[:mail] -%>
51
+ <% mail_local, mail_host = mail.split("@", 2) -%>
52
+ <% mail_subdomain, mail_domain = mail_host.split(".", 2) -%>
53
+ <% group = venue[:group] || mail_local # XXX -%>
54
+ <% arch = venue[:arch] || "https://mailarchive.ietf.org/arch/browse/#{mail_local}/" -%>
55
+ <% GROUPS = {"ietf" => "Working ", "irtf" => "Research "} -%>
56
+ <% type = venue[:type] || "#{GROUPS[mail_subdomain]}Group" -%>
57
+ <t>Discussion of this document takes place on the
58
+ <%=group%> <%=type%> mailing list (<%=mail%>),
59
+ which is archived at <eref target="<%=arch%>"/>.</t>
60
+ <% end -%>
61
+ <% if gh = venue[:github] -%>
62
+ <t>Source for this draft and an issue tracker can be found at
63
+ <eref target="https://github.com/<%=gh%>"/>.</t>
64
+ <% end -%>
65
+ </note>
66
+ <% venue.warn_if_leftovers -%>
67
+ <% end -%>
68
+ <% end -%>
69
+
45
70
  <% sechash.keys.each do |k| -%>
46
71
  <% if k =~ /\A(to_be_removed_)?note_(.*)/ -%>
47
72
 
@@ -78,6 +103,7 @@
78
103
  {:removeinrfc: removeinrfc="true"}
79
104
  {:notoc: toc="exclude"}
80
105
  {:compact: spacing="compact"}
106
+ {:noabbrev: noabbrev="true"}
81
107
  {::nomarkdown}
82
108
 
83
109
  <%= sechash.delete("middle") %>
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.5.14'
3
+ s.version = '1.5.15'
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.}
@@ -226,7 +226,11 @@ module Kramdown
226
226
  )
227
227
  STUDLY_ATTR_MAP = Hash[STUDLY_ATTR.map {|s| [s.downcase, s]}]
228
228
 
229
- def rfc2629_fix
229
+ TRUTHY = Hash.new {|h, k| k}
230
+ TRUTHY["false"] = false
231
+ TRUTHY["no"] = false
232
+
233
+ def rfc2629_fix(opts)
230
234
  if a = attr
231
235
  if anchor = a.delete('id')
232
236
  a['anchor'] = ::Kramdown::Parser::RFC2629Kramdown.idref_cleanup(anchor)
@@ -234,12 +238,16 @@ module Kramdown
234
238
  if anchor = a.delete('href')
235
239
  a['target'] = ::Kramdown::Parser::RFC2629Kramdown.idref_cleanup(anchor)
236
240
  end
241
+ if av = a.delete('noabbrev') # pseudo attribute -> opts
242
+ opts = opts.merge(noabbrev: TRUTHY[av]) # updated copy
243
+ end
237
244
  attr.keys.each do |k|
238
245
  if (d = k.gsub(/_(.|$)/) { $1.upcase }) != k or d = STUDLY_ATTR_MAP[k]
239
246
  a[d] = a.delete(k)
240
247
  end
241
248
  end
242
249
  end
250
+ opts
243
251
  end
244
252
  end
245
253
 
@@ -294,15 +302,15 @@ module Kramdown
294
302
  end
295
303
 
296
304
  def convert1(el, indent, opts = {})
297
- el.rfc2629_fix
298
- send("convert_#{el.type}", el, indent, opts)
305
+ nopts = el.rfc2629_fix(opts)
306
+ send("convert_#{el.type}", el, indent, nopts)
299
307
  end
300
308
 
301
309
  def inner_a(el, indent, opts)
302
310
  indent += INDENTATION
303
311
  el.children.map do |inner_el|
304
- inner_el.rfc2629_fix
305
- send("convert_#{inner_el.type}", inner_el, indent, opts)
312
+ nopts = inner_el.rfc2629_fix(opts)
313
+ send("convert_#{inner_el.type}", inner_el, indent, nopts)
306
314
  end
307
315
  end
308
316
 
@@ -664,6 +672,7 @@ COLORS
664
672
  if sl = el.attr.delete('slugifiedName') # could do general name- play
665
673
  attrstring = html_attributes({'slugifiedName' => sl})
666
674
  end
675
+ # noabbrev: true -- Workaround for https://trac.ietf.org/trac/xml2rfc/ticket/683
667
676
  irefs = "<name#{attrstring}>#{inner(el, indent, opts.merge(noabbrev: true))}</name>" #
668
677
  else
669
678
  clean, irefs = clean_pcdata(inner_a(el, indent, opts))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-rfc2629
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.14
4
+ version: 1.5.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann