kramdown-rfc2629 1.6.37 → 1.6.38

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: ea81e522df55255e9f76abebbbf3d804539252441a2d9d5b3fc1a2997a0382b4
4
- data.tar.gz: e9382ad7bac6dcd7602a32123d79e968c1aeabeec7a381529dd52df6848127f4
3
+ metadata.gz: 8b4707d20a26b963bdbf7423a2cc460769d6336d2ff01b47a3f74ec34f9a09fc
4
+ data.tar.gz: 3371f7774a039bf5effefb353baf1ffb7e1ccac76369db43f0f77c9b6e4284be
5
5
  SHA512:
6
- metadata.gz: c93291f8b176f0f06e7cefb4d88eb8bd9b0519235e36e8acb796a10f1db9bc7a0e15b7635ed479b6df7334062b946215b7153ab322ae4d4f7b39bc03fa62ddff
7
- data.tar.gz: bea4113567f46ec383d0f4c0dc19b9607fcb8be30411cf683e76783d3710f2a3b88201e40ef4a1fd6adb6902767bd42d53f3bfa85e6f7dfca8553e26f078e23c
6
+ metadata.gz: ab844b01fc405878b32920b37ee05bc9354c6a5d3d9a2adf2eeeeca1862e89ebec0b94d7638afb893de745c3142d69ad4aecfa534f814dc7288b4208cb226fce
7
+ data.tar.gz: 60f42e7ded57af960bf618078eaa6d3f16591fc8099b897b1d5d7108bcf38b4e50c4123d198d1409197488f6ef7ab5678788c40bf42c097ccb859b6a09ebbe05
@@ -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] || gensym.succ!
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.text, unfold)
66
+ taken[ty][name] << handle_artwork_sourcecode(x.all_text, unfold)
65
67
  end
66
68
  end
67
69
 
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.6.37'
3
+ s.version = '1.6.38'
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.}
@@ -266,7 +266,7 @@ def xml_from_sections(input)
266
266
  end
267
267
 
268
268
  coding_override = ps.has(:coding)
269
- smart_quotes = ps[:smart_quotes]
269
+ smart_quotes = ps[:smart_quotes] || ps[:"smart-quotes"]
270
270
  typographic_symbols = ps[:typographic_symbols]
271
271
  header_kramdown_options = ps[:kramdown_options]
272
272
 
@@ -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.37
4
+ version: 1.6.38
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-06 00:00:00.000000000 Z
11
+ date: 2023-07-13 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