kramdown-rfc2629 1.5.16 → 1.5.17

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: def25c3e3ddc2683800f2521956c7b7546da22ff963d08ea373bdb3626f5be6f
4
- data.tar.gz: 453b9c763e43fa1930fe6f9239efb4951d73e479c4a82df1578443c872cec588
3
+ metadata.gz: 437ec106fe0458259c9f776fb89ed2993ffea7a466a66f087cb2dd4a460616b3
4
+ data.tar.gz: 255a5c80a71f8e5447c59a557b58c8ccbb6bc4ad503f838650a6e5c49083b0fb
5
5
  SHA512:
6
- metadata.gz: c7b09f669ef3c392e932264a1818db17679956178095a426d00ec0858c83dd5305752f2c9dfd042117f7f2786b085b750aa397f5afe0cf114a0811ca316fcbee
7
- data.tar.gz: a14a50df013430d0e73b1d1e03a954cf6b54feef3cdaaca402546b93b086eb954bb22f85484fc5eda8da2859e6e0cd8dcc2a073d1509825e99dcb8c9754f03b3
6
+ metadata.gz: d2a9724e14f28a37f6426b1173b25941a7fe1ed113be1a7c45da2e1bc855ae367723a5bf92c515ad6dd7da95d6616c91c8d16de51f366c0ec4c20417073c0ac8
7
+ data.tar.gz: '088030252b477385ecfa4447a4b76a472f8fbe33b0104c680feb8ea6493b4fe72334c087ec2321bfc567901595a3113750757fb35a7d69e794ef25c30071c435'
@@ -47,20 +47,32 @@
47
47
  <% if venue -%>
48
48
  <% venue = KramdownRFC::ParameterSet.new(venue) -%>
49
49
  <note title="Discussion Venues" removeInRFC="true">
50
- <% if mail = venue[:mail] -%>
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
- <% 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>
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="https://github.com/<%=gh%>"/>.</t>
75
+ <eref target="<%=repo%>"/>.</t>
64
76
  <% end -%>
65
77
  </note>
66
78
  <% venue.warn_if_leftovers -%>
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.5.16'
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.}
@@ -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.16
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-01 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown