kramdown-rfc2629 1.7.21 → 1.7.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/kramdown-rfc-extract-figures-tables +3 -0
- data/data/kramdown-rfc2629.erb +6 -0
- data/kramdown-rfc2629.gemspec +1 -1
- data/lib/kramdown-rfc/kdrfc-processor.rb +13 -5
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6829cc1f3803f3a5badbe865394e4bd303c26fb2ec5710ed2347cdbabea1f529
|
4
|
+
data.tar.gz: 5505e3f40551c0e7a1b4341b2a87ae80aa7e28c5bb773a2b7dc99ad491ab1ded
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb74883f8051016119e1cfe1a2ae7270919d599e8416bde8fa7632d64e5080d02bfba81ad7ec37fc6a4817ee18c1dcb53ff23cefa3f1d5c32c0888456ac7cc9e
|
7
|
+
data.tar.gz: 7f89516975da7b9017642c882c6154173da0116d39db648a298b1c42bb974f9224eec8d6b34f90132008577eba6617b59636b37a40f6dc2851cb1c9f8787b822
|
@@ -68,10 +68,13 @@ lists.each do |k, v|
|
|
68
68
|
puts
|
69
69
|
puts "# #{title}"
|
70
70
|
puts "{:unnumbered}"
|
71
|
+
puts
|
72
|
+
puts "{:compact}"
|
71
73
|
else
|
72
74
|
fail
|
73
75
|
end
|
74
76
|
v.each_with_index do |(ref, ti), n|
|
77
|
+
ti.sub!(/,?[\p{Zl}\p{Zp}\p{Cc}].*/, "") # first line of caption only
|
75
78
|
ti = "[#{ti}](##{ref})" if ref
|
76
79
|
puts "#{n+1}. #{ti}"
|
77
80
|
end
|
data/data/kramdown-rfc2629.erb
CHANGED
@@ -52,6 +52,12 @@
|
|
52
52
|
<% end -%>
|
53
53
|
|
54
54
|
<rfc <%=rfcattrs%>>
|
55
|
+
<% ps.arr("v3xml2rfc", false) do |pi, val|
|
56
|
+
Array(val).each do |el|
|
57
|
+
-%>
|
58
|
+
<?v3xml2rfc <%=pi%>="<%=ps.escattr(el)%>"?>
|
59
|
+
<% end
|
60
|
+
end -%>
|
55
61
|
<front>
|
56
62
|
<%= ps.ele("title", ps.attr("abbrev=titleabbrev")) %>
|
57
63
|
|
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.7.
|
3
|
+
s.version = '1.7.22'
|
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.}
|
@@ -18,6 +18,7 @@ class KDRFC
|
|
18
18
|
# )))
|
19
19
|
|
20
20
|
KDRFC_PREPEND = [ENV["KDRFC_PREPEND"]].compact
|
21
|
+
KDRFC_XML2RFC_FLAGS = Array(ENV["KDRFC_XML2RFC_FLAGS"]&.split(","))
|
21
22
|
|
22
23
|
def v3_flag?
|
23
24
|
[*(@options.v3 ? ["--v3"] : []),
|
@@ -37,6 +38,15 @@ def process_mkd(input, output)
|
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
41
|
+
def filename_ct(fn, ext)
|
42
|
+
bn = File.basename(fn, ".*")
|
43
|
+
if r = ENV["KRAMDOWN_RFC_DOCREV"]
|
44
|
+
bn << "-#{r}"
|
45
|
+
end
|
46
|
+
{filename: "#{bn}.#{ext}",
|
47
|
+
content_type: "text/plain"}
|
48
|
+
end
|
49
|
+
|
40
50
|
def run_idnits(*args)
|
41
51
|
if @options.remote
|
42
52
|
run_idnits_remotely(*args)
|
@@ -62,8 +72,7 @@ def run_idnits_remotely(txt_fn)
|
|
62
72
|
url = URI(IDNITS_WEBSERVICE)
|
63
73
|
req = Net::HTTP::Post.new(url)
|
64
74
|
form = [["file", File.open(txt_fn),
|
65
|
-
|
66
|
-
content_type: "text/plain"}],
|
75
|
+
filename_ct(txt_fn, "txt")],
|
67
76
|
["hidetext", "true"]]
|
68
77
|
diag = ["url/form: ", url, form].inspect
|
69
78
|
req.set_form(form, 'multipart/form-data')
|
@@ -105,7 +114,7 @@ end
|
|
105
114
|
def process_xml_locally(input, output, *flags)
|
106
115
|
warn "* converting locally from xml #{input} to txt #{output}" if @options.verbose
|
107
116
|
begin
|
108
|
-
o, s = Open3.capture2(*KDRFC_PREPEND, "xml2rfc", *v3_flag?, *flags, input)
|
117
|
+
o, s = Open3.capture2(*KDRFC_PREPEND, "xml2rfc", *v3_flag?, *flags, *KDRFC_XML2RFC_FLAGS, input)
|
109
118
|
puts o
|
110
119
|
if s.success?
|
111
120
|
warn "* #{output} written" if @options.verbose
|
@@ -152,8 +161,7 @@ def process_xml_remotely(input, output, *flags)
|
|
152
161
|
url = URI(XML2RFC_WEBSERVICE + maf)
|
153
162
|
req = Net::HTTP::Post.new(url)
|
154
163
|
form = [["file", File.open(input),
|
155
|
-
|
156
|
-
content_type: "text/plain"}]]
|
164
|
+
filename_ct(input, "xml")]]
|
157
165
|
diag = ["url/form: ", url, form].inspect
|
158
166
|
req.set_form(form, 'multipart/form-data')
|
159
167
|
warn "* requesting at #{url}" if @options.verbose
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kramdown-rfc2629
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-24 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: kramdown
|
@@ -209,7 +208,6 @@ homepage: http://github.com/cabo/kramdown-rfc
|
|
209
208
|
licenses:
|
210
209
|
- MIT
|
211
210
|
metadata: {}
|
212
|
-
post_install_message:
|
213
211
|
rdoc_options: []
|
214
212
|
require_paths:
|
215
213
|
- lib
|
@@ -224,8 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
222
|
- !ruby/object:Gem::Version
|
225
223
|
version: '0'
|
226
224
|
requirements: []
|
227
|
-
rubygems_version: 3.
|
228
|
-
signing_key:
|
225
|
+
rubygems_version: 3.6.2
|
229
226
|
specification_version: 4
|
230
227
|
summary: Kramdown extension for generating RFCXML (RFC 799x).
|
231
228
|
test_files: []
|