kramdown-rfc2629 1.7.5 → 1.7.7

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: c4312704a187b582d3529a40e9823be50ad351fed98b6e29ab808098c56f9a0b
4
- data.tar.gz: 27b76a9e2993053e0833e26989d97c074a0a3dcae3b47fd40d1aeaa96d928620
3
+ metadata.gz: d6a85efbf1f07ea2b7ea1bd765cf6e1b81ab1dfd3615b725ebc657593568fd35
4
+ data.tar.gz: 27439b1db2adb2395561a41b6a34e1607f71d21c10968b5e52b2483b1b3d9cab
5
5
  SHA512:
6
- metadata.gz: c759b0acce805b13a263ec9b7246524a880715ff347d2b55e804a068c267dac09dc4bbc0630fc397ccdf364dd1b33102eff048729acacb271601b161502365c1
7
- data.tar.gz: 4fb895add0affa38a4504c0e610676cef702a336e4377fee1142b41ddf1f83541ec64084aceb103857d944a14680561b53d19327d4661b15ae65e65de5b7b67e
6
+ metadata.gz: 173a34ae9dcf04c4b64e5c7c2145bf9f5ac96e45fe305dff11762355f39e1d92cb2ab1101437e78b1333918454f056080900a0c30497565f8195621d3b31ce5d
7
+ data.tar.gz: 804071697144e02f000bc9dfa74fc8492b9a41f4d42466d9b8b38ce613a8089f36f4edd09a391065382fa7f02e579eaec7db4812fe2df21800972c2228b7b07f
data/bin/kdrfc CHANGED
@@ -45,15 +45,21 @@ BANNER
45
45
  opts.on("-h", "--[no-]html", "Convert to html as well") do |v|
46
46
  kdrfc.options.html = v
47
47
  end
48
- opts.on("-t", "--[no-]txt", "Convert to txt as well") do |v|
48
+ opts.on("-t", "--[no-]txt", "Convert to txt as well (default)") do |v|
49
49
  kdrfc.options.txt = v
50
50
  end
51
+ opts.on("-n", "Do not convert to txt (--no-txt)") do |v|
52
+ kdrfc.options.txt = !v
53
+ end
51
54
  opts.on("-3", "--[no-]v3", "Use RFCXML v3 processing rules") do |v|
52
55
  kdrfc.options.v3 = v
53
56
  end
54
57
  opts.on("-2", "--[no-]v2", "Use RFCXML v2 processing rules") do |v|
55
58
  kdrfc.options.v2 = v
56
59
  end
60
+ opts.on("-dNN", "--docrev=NN", /[0-9][0-9]/, "Replace -latest by -NN in docname") do |v|
61
+ ENV["KRAMDOWN_RFC_DOCREV"] = v
62
+ end
57
63
  end
58
64
  op.parse!
59
65
 
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.7.5'
3
+ s.version = '1.7.7'
4
4
  s.summary = "Kramdown extension for generating RFCXML (RFC 799x)."
5
5
  s.description = %{An RFCXML (RFC 799x) generating backend for Thomas Leitner's
6
6
  "kramdown" markdown parser. Mostly useful for RFC writers.}
@@ -70,7 +70,8 @@ end
70
70
  def boilerplate(key)
71
71
  ret = ''
72
72
  case key.downcase
73
- when /\Abcp14(info)?(\+)?(-tagged)?\z/i
73
+ when /\Abcp14(info)?(\+)?(-tagged)?(-bcp)?\z/i
74
+ # $1 $2 $3 $4
74
75
  if $1
75
76
  ret << <<RFC8174ise
76
77
  Although this document is not an IETF Standards Track publication, it
@@ -108,6 +109,13 @@ PLUS
108
109
  *[OPTIONAL]: <bcp14>
109
110
  TAGGED
110
111
  end
112
+ if $4 # experimental; idnits complains:
113
+ # ** The document seems to lack a both a reference to RFC 2119 and the
114
+ # recommended RFC 2119 boilerplate, even if it appears to use RFC 2119
115
+ # keywords -- however, there's a paragraph with a matching beginning.
116
+ # Boilerplate error?
117
+ ret.sub!("{{!RFC2119}} {{!RFC8174}}", "{{!BCP14}}")
118
+ end
111
119
  ret
112
120
  when /\Arfc\s*7942(info)?\z/i
113
121
  if $1
@@ -288,6 +296,13 @@ def xml_from_sections(input)
288
296
  end
289
297
  end
290
298
 
299
+ if r = ENV["KRAMDOWN_RFC_DOCREV"]
300
+ warn "** building document revision -#{r}"
301
+ unless n = ps.has(:docname) and n.sub!(/-latest\z/, "-#{r}")
302
+ warn "** -d#{r}: docname #{n.inspect} doesn't have a '-latest' suffix"
303
+ end
304
+ end
305
+
291
306
  if o = ps[:'autolink-iref-cleanup']
292
307
  $options.autolink_iref_cleanup = o
293
308
  end
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.7.5
4
+ version: 1.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown