kramdown-rfc2629 1.5.16 → 1.5.17
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/data/kramdown-rfc2629.erb +19 -7
- data/kramdown-rfc2629.gemspec +1 -1
- data/lib/kramdown-rfc2629.rb +29 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 437ec106fe0458259c9f776fb89ed2993ffea7a466a66f087cb2dd4a460616b3
|
|
4
|
+
data.tar.gz: 255a5c80a71f8e5447c59a557b58c8ccbb6bc4ad503f838650a6e5c49083b0fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2a9724e14f28a37f6426b1173b25941a7fe1ed113be1a7c45da2e1bc855ae367723a5bf92c515ad6dd7da95d6616c91c8d16de51f366c0ec4c20417073c0ac8
|
|
7
|
+
data.tar.gz: '088030252b477385ecfa4447a4b76a472f8fbe33b0104c680feb8ea6493b4fe72334c087ec2321bfc567901595a3113750757fb35a7d69e794ef25c30071c435'
|
data/data/kramdown-rfc2629.erb
CHANGED
|
@@ -47,20 +47,32 @@
|
|
|
47
47
|
<% if venue -%>
|
|
48
48
|
<% venue = KramdownRFC::ParameterSet.new(venue) -%>
|
|
49
49
|
<note title="Discussion Venues" removeInRFC="true">
|
|
50
|
-
<%
|
|
50
|
+
<% mail = venue[:mail] -%>
|
|
51
|
+
<% homepage = venue[:home] -%>
|
|
52
|
+
<% gtype = venue[:type] -%>
|
|
53
|
+
<% if mail || homepage -%>
|
|
54
|
+
<t>
|
|
55
|
+
<% end -%>
|
|
56
|
+
<% if mail -%>
|
|
51
57
|
<% mail_local, mail_host = mail.split("@", 2) -%>
|
|
52
58
|
<% mail_subdomain, mail_domain = mail_host.split(".", 2) -%>
|
|
53
59
|
<% group = venue[:group] || mail_local # XXX -%>
|
|
54
60
|
<% arch = venue[:arch] || "https://mailarchive.ietf.org/arch/browse/#{mail_local}/" -%>
|
|
55
61
|
<% GROUPS = {"ietf" => "Working ", "irtf" => "Research "} -%>
|
|
56
|
-
<%
|
|
57
|
-
|
|
58
|
-
<%=group%> <%=
|
|
59
|
-
which is archived at <eref target="<%=arch%>"
|
|
62
|
+
<% gtype ||= "#{GROUPS[mail_subdomain]}Group" -%>
|
|
63
|
+
Discussion of this document takes place on the
|
|
64
|
+
<%=group%> <%=gtype%> mailing list (<eref target="mailto:<%=mail%>"/>),
|
|
65
|
+
which is archived at <eref target="<%=arch%>"/>.
|
|
66
|
+
<% end -%>
|
|
67
|
+
<% if homepage -%>
|
|
68
|
+
<%=gtype%> information can be found at <eref target="<%=homepage%>"/>.
|
|
69
|
+
<% end -%>
|
|
70
|
+
<% if mail || homepage -%>
|
|
71
|
+
</t>
|
|
60
72
|
<% end -%>
|
|
61
|
-
<% if gh = venue[:github] -%>
|
|
73
|
+
<% if repo = venue[:repo] || ((gh = venue[:github]) && "https://github.com/#{gh}") -%>
|
|
62
74
|
<t>Source for this draft and an issue tracker can be found at
|
|
63
|
-
<eref target="
|
|
75
|
+
<eref target="<%=repo%>"/>.</t>
|
|
64
76
|
<% end -%>
|
|
65
77
|
</note>
|
|
66
78
|
<% venue.warn_if_leftovers -%>
|
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.5.
|
|
3
|
+
s.version = '1.5.17'
|
|
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.}
|
data/lib/kramdown-rfc2629.rb
CHANGED
|
@@ -624,6 +624,35 @@ COLORS
|
|
|
624
624
|
"sourcecode"
|
|
625
625
|
end
|
|
626
626
|
)
|
|
627
|
+
loc_str =
|
|
628
|
+
if anchor = el.attr['anchor']
|
|
629
|
+
"##{anchor}"
|
|
630
|
+
elsif lineno = el.options[:location]
|
|
631
|
+
"approx. line #{lineno}" # XXX
|
|
632
|
+
else
|
|
633
|
+
"UNKNOWN"
|
|
634
|
+
end
|
|
635
|
+
case t
|
|
636
|
+
when "json"
|
|
637
|
+
begin
|
|
638
|
+
JSON.load(result)
|
|
639
|
+
rescue => e
|
|
640
|
+
err1 = "*** #{loc_str}: JSON isn't: #{e.message[0..40]}\n"
|
|
641
|
+
begin
|
|
642
|
+
JSON.load("{" << result << "}")
|
|
643
|
+
rescue => e
|
|
644
|
+
warn err1 << "*** not even with braces added around: #{e.message[0..40]}"
|
|
645
|
+
end
|
|
646
|
+
end
|
|
647
|
+
when "json-from-yaml"
|
|
648
|
+
begin
|
|
649
|
+
y = YAML.safe_load(result, aliases: true, filename: loc_str)
|
|
650
|
+
result = JSON.pretty_generate(y)
|
|
651
|
+
t = "json" # XXX, this could be another format!
|
|
652
|
+
rescue => e
|
|
653
|
+
warn "*** YAML isn't: #{e.message}\n"
|
|
654
|
+
end
|
|
655
|
+
end
|
|
627
656
|
"#{' '*indent}<figure#{el_html_attributes(el)}><#{gi}#{html_attributes(artwork_attr)}><![CDATA[#{result}#{result =~ /\n\Z/ ? '' : "\n"}]]></#{gi}></figure>\n"
|
|
628
657
|
end
|
|
629
658
|
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.5.
|
|
4
|
+
version: 1.5.17
|
|
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-11-
|
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: kramdown
|