kramdown-rfc2629 1.6.42 → 1.6.43

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: bd4b84a97e79385787341f72d184839730c05ab3e33021823c9d83c87faef47e
4
- data.tar.gz: 8df16059c4ffaeb27578151471aaac730f8cfa4c549dbaf922a3c590265743f7
3
+ metadata.gz: be23f7eeaf77c43ddf7a7c107f4d8b63fbb889e16c8e8bc2f884ee4bf8ed1beb
4
+ data.tar.gz: 8e80fe90c56b9a6f71bcde89f7a2e2453723ce1c14ff5da318bf13aef1462aae
5
5
  SHA512:
6
- metadata.gz: 6222277e78f07ee3fc05c40cd7d1b0e5ec197f600e49e395e33fc5b3975865a6c3fbcaf310934d3b3e6ddcbc260e69ce878b8f3fbcb99b9824204b1c4759ed1f
7
- data.tar.gz: ee98f5323fbf5c590b983d1faa181fd6ce459d5e40ecdfa7868773aa739f6332be0c32e2c336576364703c06d2ed0df884d9429385d0fc7d626275f8c8a558a7
6
+ metadata.gz: 80ef5c32e66e82c1055a5c3fb5ededfb0d77545b7a9332490efe0eb21e5412786e7037cf0ce82878fccd9acb8b1e6773fc21c5ad5c365702c8eab02c3586511b
7
+ data.tar.gz: 3bf117e47f149b84fc99b4c16ebd2df4e1f02d70cde17ece0a07017c96a169fba2a1e63404705610690ea6b2fd7cf0f328183cec34c90f3d8b812beb9442ffe4
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.6.42'
3
+ s.version = '1.6.43'
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.}
@@ -294,6 +294,12 @@ def xml_from_sections(input)
294
294
  if o = ps[:'svg-id-cleanup']
295
295
  $options.svg_id_cleanup = o
296
296
  end
297
+ if o = ps[:'span-into']
298
+ Array(o).each do |el|
299
+ Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL[el] = :span
300
+ warn Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL.inspect
301
+ end
302
+ end
297
303
 
298
304
  coding_override = ps.has(:coding)
299
305
  smart_quotes = ps[:smart_quotes] || ps[:"smart-quotes"]
@@ -42,8 +42,8 @@ module Kramdown
42
42
  sorted_abbrevs = @root.options[:abbrev_defs].keys.sort {|a, b| b.length <=> a.length }
43
43
  regexps = [Regexp.union(*sorted_abbrevs.map {|k|
44
44
  /#{Regexp.escape(k).gsub(/\\\s/, "[\\s\\p{Z}]+").force_encoding(Encoding::UTF_8)}/})]
45
- # warn regexps.inspect
46
45
  regexps << /(?=(?:\W|^)#{regexps.first}(?!\w))/ # regexp should only match on word boundaries
46
+ # warn regexps.inspect
47
47
  end
48
48
  super(el, regexps)
49
49
  end
@@ -1498,7 +1498,9 @@ COLORS
1498
1498
 
1499
1499
  hacked_value = value
1500
1500
 
1501
+ nobr = false
1501
1502
  if title && title =~ /\A<nobr>(\z|\s)/
1503
+ nobr = true
1502
1504
  _nobr, title = title.split(' ', 2)
1503
1505
  hacked_value = nobr_hack(value)
1504
1506
  if title.nil? || title.empty?
@@ -1518,11 +1520,19 @@ COLORS
1518
1520
  end
1519
1521
 
1520
1522
  if item = title
1521
- m = title.scan(Parser::RFC2629Kramdown::IREF_START)
1522
- if m.empty?
1523
+ pairs = title.split(Parser::RFC2629Kramdown::IREF_START).each_slice(2).to_a
1524
+ replacement = pairs.map {|x,| s = x.strip; s unless s.empty?}.compact.join(" ")
1525
+ irefs = pairs.map {|_,x| x && [x]}.compact
1526
+ warn "@@@ ABBREV MISMATCH #{irefs}" if title.scan(Parser::RFC2629Kramdown::IREF_START) != irefs
1527
+ if irefs.empty?
1523
1528
  subitem = value
1524
1529
  else
1525
- iref = m.map{|a,| iref_attr(a)}.join('')
1530
+ iref = irefs.map{|a,| iref_attr(a)}.join('')
1531
+ end
1532
+ unless replacement.empty?
1533
+ replacement = nobr_hack(replacement) if nobr # XXX this can break XML
1534
+ replacement = ::Kramdown::Converter::Rfc2629::process_markdown(replacement)
1535
+ hacked_value = replacement
1526
1536
  end
1527
1537
  else
1528
1538
  item = value
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.42
4
+ version: 1.6.43
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-09-22 00:00:00.000000000 Z
11
+ date: 2023-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown