kramdown-rfc2629 1.6.37 → 1.6.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/kramdown-rfc-extract-sourcecode +4 -2
- data/kramdown-rfc2629.gemspec +1 -1
- data/lib/kramdown-rfc/command.rb +30 -2
- data/lib/kramdown-rfc/rexml-all-text.rb +20 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dd9850010affb48c52dc3a4588cb1b40865e70cf48df86462bcace0a3bad608
|
4
|
+
data.tar.gz: 2cb3b944b632a2531df81229ebd66070322e9bcf5618aad25056b157645a2659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec990f7803c98045b0c0996a9b01f378cbed9047853c6f7362883ea6fdf54566fa5409ca2ec7139e5b6e3fbeaca7949a09f19099d3fbb0573423eac460aefe69
|
7
|
+
data.tar.gz: 80309e87ac34e71824b7adbcef296f77e0c5f5b448f7b6161d0541b9ff36ecc8c59d5307ff6f67ef1ae97398cfe5ec9886cccf23cecb3556a8f0d0723ce10a3b
|
@@ -4,6 +4,7 @@ require 'yaml'
|
|
4
4
|
require 'shellwords'
|
5
5
|
require 'fileutils'
|
6
6
|
require_relative '../lib/kramdown-rfc/rfc8792'
|
7
|
+
require_relative '../lib/kramdown-rfc/rexml-all-text.rb'
|
7
8
|
|
8
9
|
def clean(s)
|
9
10
|
s.gsub!(/\//, ":")
|
@@ -51,7 +52,8 @@ d = REXML::Document.new(ARGF)
|
|
51
52
|
REXML::XPath.each(d.root, "//sourcecode|//artwork") do |x|
|
52
53
|
if ty = x[:type]
|
53
54
|
ty = clean(ty)
|
54
|
-
name = x[:name]
|
55
|
+
name = x[:name]
|
56
|
+
name = gensym.succ! if !name || name.empty?
|
55
57
|
name = clean(name)
|
56
58
|
if taken[ty][name]
|
57
59
|
unless warned[ty][name]
|
@@ -61,7 +63,7 @@ REXML::XPath.each(d.root, "//sourcecode|//artwork") do |x|
|
|
61
63
|
else
|
62
64
|
taken[ty][name] = ''
|
63
65
|
end
|
64
|
-
taken[ty][name] << handle_artwork_sourcecode(x.
|
66
|
+
taken[ty][name] << handle_artwork_sourcecode(x.all_text, unfold)
|
65
67
|
end
|
66
68
|
end
|
67
69
|
|
data/kramdown-rfc2629.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'kramdown-rfc2629'
|
3
|
-
s.version = '1.6.
|
3
|
+
s.version = '1.6.39'
|
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.}
|
data/lib/kramdown-rfc/command.rb
CHANGED
@@ -68,9 +68,9 @@ end
|
|
68
68
|
|
69
69
|
|
70
70
|
def boilerplate(key)
|
71
|
+
ret = ''
|
71
72
|
case key.downcase
|
72
73
|
when /\Abcp14(info)?(\+)?(-tagged)?\z/i
|
73
|
-
ret = ''
|
74
74
|
if $1
|
75
75
|
ret << <<RFC8174ise
|
76
76
|
Although this document is not an IETF Standards Track publication, it
|
@@ -109,6 +109,34 @@ PLUS
|
|
109
109
|
TAGGED
|
110
110
|
end
|
111
111
|
ret
|
112
|
+
when /\Arfc\s*7942(info)?\z/i
|
113
|
+
if $1
|
114
|
+
ret << <<INFO
|
115
|
+
(Boilerplate as per {{Section 2.1 of RFC7942}}:)
|
116
|
+
|
117
|
+
INFO
|
118
|
+
end
|
119
|
+
ret << <<RFC7942
|
120
|
+
This section records the status of known implementations of the
|
121
|
+
protocol defined by this specification at the time of posting of
|
122
|
+
this Internet-Draft, and is based on a proposal described in
|
123
|
+
{{?RFC7942}}. The description of implementations in this section is
|
124
|
+
intended to assist the IETF in its decision processes in
|
125
|
+
progressing drafts to RFCs. Please note that the listing of any
|
126
|
+
individual implementation here does not imply endorsement by the
|
127
|
+
IETF. Furthermore, no effort has been spent to verify the
|
128
|
+
information presented here that was supplied by IETF contributors.
|
129
|
+
This is not intended as, and must not be construed to be, a
|
130
|
+
catalog of available implementations or their features. Readers
|
131
|
+
are advised to note that other implementations may exist.
|
132
|
+
|
133
|
+
According to {{?RFC7942}}, "this will allow reviewers and working
|
134
|
+
groups to assign due consideration to documents that have the
|
135
|
+
benefit of running code, which may serve as evidence of valuable
|
136
|
+
experimentation and feedback that have made the implemented
|
137
|
+
protocols more mature. It is up to the individual working groups
|
138
|
+
to use this information as they see fit".
|
139
|
+
RFC7942
|
112
140
|
else
|
113
141
|
warn "** Unknwon boilerplate key: #{key}"
|
114
142
|
"{::boilerplate #{key}}"
|
@@ -266,7 +294,7 @@ def xml_from_sections(input)
|
|
266
294
|
end
|
267
295
|
|
268
296
|
coding_override = ps.has(:coding)
|
269
|
-
smart_quotes = ps[:smart_quotes]
|
297
|
+
smart_quotes = ps[:smart_quotes] || ps[:"smart-quotes"]
|
270
298
|
typographic_symbols = ps[:typographic_symbols]
|
271
299
|
header_kramdown_options = ps[:kramdown_options]
|
272
300
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rexml/document'
|
2
|
+
|
3
|
+
module REXML
|
4
|
+
# all_text: Get all text from descendants that are Text or CData
|
5
|
+
class Element
|
6
|
+
def all_text
|
7
|
+
@children.map {|c| c.all_text}.join
|
8
|
+
end
|
9
|
+
end
|
10
|
+
class Text # also: ancestor of CData
|
11
|
+
def all_text
|
12
|
+
value
|
13
|
+
end
|
14
|
+
end
|
15
|
+
class Child
|
16
|
+
def all_text
|
17
|
+
''
|
18
|
+
end
|
19
|
+
end
|
20
|
+
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.6.
|
4
|
+
version: 1.6.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|
@@ -182,6 +182,7 @@ files:
|
|
182
182
|
- lib/kramdown-rfc/kdrfc-processor.rb
|
183
183
|
- lib/kramdown-rfc/parameterset.rb
|
184
184
|
- lib/kramdown-rfc/refxml.rb
|
185
|
+
- lib/kramdown-rfc/rexml-all-text.rb
|
185
186
|
- lib/kramdown-rfc/rexml-formatters-conservative.rb
|
186
187
|
- lib/kramdown-rfc/rfc8792.rb
|
187
188
|
- lib/kramdown-rfc/svg-id-cleanup.rb
|