kramdown-rfc2629 1.7.4 → 1.7.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c60909608ac8c84853d39c03fdf0da2cdfd179601a63a5b07a52099925a8ce9
4
- data.tar.gz: ce8fcfe62f77fc23a8a5514e329ade31864ac099f5a45c6bbce976e3a8210a1e
3
+ metadata.gz: fa027b12b5ef1dc11718e82a28bc2a126208b7480048a41a03eebfd75fd5f2d7
4
+ data.tar.gz: fa96be9f490186b8634c52abfcf613e1b5f4b30e329b398879a93394bf0b92f7
5
5
  SHA512:
6
- metadata.gz: 3b11fe08773c3e5c80aaaaeff16bf6728ab8656ee95ce0186bf786b2da2b99832b65b36fa32e7801e36b3f9c32b4e90830fa4c14f5136d0f7945c2c342ba17d1
7
- data.tar.gz: 35a372c29219550c56a2335a497b3117621ac7b998792d596272fad84725a6f464a89bb931c9472a0ef4320eee40b69088e3f595ef8e6a028e7ba0a57e58436f
6
+ metadata.gz: 2880e284c22e96e281498028f3e2339ff1f91e7326791c547851022505df9a169dbe47a76604b5fd67de5c3a3cfe180153c93f8b9798bae16764314301ec0ddf
7
+ data.tar.gz: 65d2639fe7c971cf67ab27bd115b18c794a78f7021febd46527b6f61fd8c748f3c515cbd913c14565b650c7bf4c53b699405142a9b6fd04de2c7fd8e3a222c6a
data/README.md CHANGED
@@ -475,8 +475,8 @@ allow for automatic entry of items as normative/informative.
475
475
  (1.0.16:) Markdown footnotes are converted into `cref`s (XML2RFC formal
476
476
  comments; note that these are only visible if the pi "comments" is set to yes).
477
477
  The anchor is taken from the markdown footnote name. The source, if
478
- needed, can be supplied by an IAD, as in (first example with
479
- ALD):
478
+ needed, can be supplied by an [IAL][], as in (first example also uses an
479
+ [ALD][]):
480
480
 
481
481
  ```markdown
482
482
  {:cabo: source="cabo"}
@@ -494,7 +494,7 @@ Note that XML2RFC v2 doesn't allow structure in crefs. If you put any,
494
494
  you get the escaped verbatim XML...
495
495
 
496
496
  (1.0.11:) Allow overriding "style" attribute (via IAL =
497
- [inline attribute list][kdsyntax-ial]) in lists and spans
497
+ [inline attribute list][IAL]) in lists and spans
498
498
  as in:
499
499
 
500
500
  ```markdown
@@ -549,8 +549,9 @@ note that this creates ugly blank space in some HTML converters).
549
549
 
550
550
  # Risks and Side-Effects
551
551
 
552
- The code is not very polished, but now quite stable; it has been successfully used for a
553
- number of non-trivial Internet-Drafts and RFCs. You probably still need to
552
+ The code is not very polished, but now quite stable; it has been
553
+ successfully used for hundreds of non-trivial Internet-Drafts and RFCs.
554
+ You probably still need to
554
555
  skim [v3][] if you want to write an Internet-Draft, but you
555
556
  don't really need to understand XML very much. Knowing the basics of
556
557
  YAML helps with the metadata (but you'll understand it from the
@@ -563,12 +564,29 @@ This can for instance be used to obtain unnumbered appendices:
563
564
  ```markdown
564
565
  Acknowledgements
565
566
  ================
566
- {: numbered="no"}
567
+ {: numbered="false"}
568
+
569
+ John Mattsson was nice enough to point out the need for this being documented.
570
+ ```
571
+
572
+
573
+ Note that this specific example is covered by a predefined
574
+ kramdown-rfc ["attribute list definition" (ALD)][ALD]:
575
+
576
+ ```markdown
577
+ {:unnumbered: numbered="false"}
578
+ ```
579
+
580
+ so the conventional way to write this example would be the somewhat simpler:
581
+
582
+ ```markdown
583
+ Acknowledgements
584
+ ================
585
+ {:unnumbered}
567
586
 
568
587
  John Mattsson was nice enough to point out the need for this being documented.
569
588
  ```
570
589
 
571
- [IAL]: https://kramdown.gettalong.org/syntax.html#inline-attribute-lists
572
590
 
573
591
  # Upconversion
574
592
 
@@ -638,7 +656,8 @@ made it possible to license kramdown-rfc under the same license.
638
656
 
639
657
  [kramdown]: https://kramdown.gettalong.org
640
658
  [kdsyntax]: http://kramdown.gettalong.org/syntax.html
641
- [kdsyntax-ial]: http://kramdown.gettalong.org/syntax.html#inline-attribute-lists
659
+ [IAL]: https://kramdown.gettalong.org/syntax.html#inline-attribute-lists
660
+ [ALD]: https://kramdown.gettalong.org/syntax.html#attribute-list-definitions
642
661
  [stupid]: http://tools.ietf.org/id/draft-hartke-xmpp-stupid-00
643
662
  [RFC 2629]: https://www.rfc-editor.org/rfc/rfc2629.html
644
663
  [RFC 7749]: https://www.rfc-editor.org/rfc/rfc7749.html
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.4'
3
+ s.version = '1.7.6'
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.}
@@ -288,6 +288,13 @@ def xml_from_sections(input)
288
288
  end
289
289
  end
290
290
 
291
+ if r = ENV["KRAMDOWN_RFC_DOCREV"]
292
+ warn "** building document revision -#{r}"
293
+ unless n = ps.has(:docname) and n.sub!(/-latest\z/, "-#{r}")
294
+ warn "** -d#{r}: docname #{n.inspect} doesn't have a '-latest' suffix"
295
+ end
296
+ end
297
+
291
298
  if o = ps[:'autolink-iref-cleanup']
292
299
  $options.autolink_iref_cleanup = o
293
300
  end
@@ -40,11 +40,19 @@ module KramdownRFC
40
40
  def attr(pn)
41
41
  val, an = van(pn)
42
42
  @av[an.intern] = val
43
- %{#{an}="#{escattr(val)}"} if val
43
+ %{#{an}="#{escattr(val)}"} if val # see attrtf below
44
44
  end
45
45
  def attrs(*pns)
46
46
  pns.map{ |pn| attr(pn) if pn }.compact.join(" ")
47
47
  end
48
+ def attrtf(pn) # can do an overriding false value
49
+ val, an = van(pn)
50
+ @av[an.intern] = val
51
+ %{#{an}="#{escattr(val)}"} unless val.nil?
52
+ end
53
+ def attrstf(*pns)
54
+ pns.map{ |pn| attrtf(pn) if pn }.compact.join(" ")
55
+ end
48
56
  def ele(pn, attr=nil, defcontent=nil, markdown=false)
49
57
  val, an = van(pn)
50
58
  val ||= defcontent
@@ -17,7 +17,8 @@ module KramdownRFC
17
17
  def self.ref_to_xml(k, v)
18
18
  vps = KramdownRFC::ParameterSet.new(v)
19
19
  erb = ERB.trim_new <<-REFERB, '-'
20
- <reference anchor="<%= escattr(k) %>" <%= vps.attr("target") %>>
20
+ <reference anchor="<%= escattr(k) %>" <%=
21
+ vps.attrstf("target", "quoteTitle=quote-title=quotetitle=qt") %>>
21
22
  <front>
22
23
  <%= vps.ele("title") -%>
23
24
 
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.4
4
+ version: 1.7.6
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-12-03 00:00:00.000000000 Z
11
+ date: 2024-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown