kramdown-rfc2629 1.5.10 → 1.5.11
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/kramdown-rfc2629.gemspec +1 -1
- data/lib/kramdown-rfc2629.rb +30 -10
- 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: b7bd20857db1f9901f6d430b02e257edb1190309b715abe1c0e914cac126a06c
|
4
|
+
data.tar.gz: 57d1fe042574bc981df911c4043a9dbb96c26e970a35693601911f564c974f3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc64c6f45a3c3a0b30a9514c10f33a383d95f3ef7ac8e640f62bee7b6265fb83a8b76bf87d9dac03e84e2c07305af2f85985069e64db30de68760b41b9dbe459
|
7
|
+
data.tar.gz: f9fb4f647903103a05d3c0b73592fc73e4eea8e489018a0105e9eb8e4aac332d82a2a9e89df660e7e5fbdf1908d5014dc6f20915668ec103ddb6fdf969a5c9e4
|
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.11'
|
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
@@ -455,6 +455,19 @@ COLORS
|
|
455
455
|
dont_clean = false
|
456
456
|
dont_check = false
|
457
457
|
case t
|
458
|
+
when "protocol", "protocol-goat"
|
459
|
+
cmdparm = result.lines.map(&:strip).select {|x| x != ''}.join(',')
|
460
|
+
result, err, _s = Open3.capture3("protocol #{Shellwords.escape(cmdparm)}", stdin_data: '')
|
461
|
+
if t == "protocol-goat"
|
462
|
+
file.unlink
|
463
|
+
file = Tempfile.new("kramdown-rfc")
|
464
|
+
file.write(result)
|
465
|
+
file.close
|
466
|
+
result1, err, _s = Open3.capture3("goat #{file.path}", stdin_data: result);
|
467
|
+
dont_clean = true
|
468
|
+
else
|
469
|
+
result1 = nil
|
470
|
+
end
|
458
471
|
when "goat"
|
459
472
|
result1, err, _s = Open3.capture3("goat #{file.path}", stdin_data: result);
|
460
473
|
dont_clean = true
|
@@ -487,15 +500,17 @@ COLORS
|
|
487
500
|
# warn ["text:", result.inspect]
|
488
501
|
# warn ["svg:", result1.inspect]
|
489
502
|
file.unlink
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
503
|
+
if result1
|
504
|
+
result1 = svg_clean(result1) unless dont_clean
|
505
|
+
unless dont_check
|
506
|
+
result1, err, _s = Open3.capture3("svgcheck -Xqa", stdin_data: result1);
|
507
|
+
# warn ["svgcheck:", result1.inspect]
|
508
|
+
capture_croak("svgcheck", err)
|
509
|
+
end
|
510
|
+
if result1 == ''
|
511
|
+
warn "*** could not create svg for #{result.inspect[0...20]}..."
|
512
|
+
exit 65 # EX_DATAERR
|
513
|
+
end
|
499
514
|
end
|
500
515
|
[result, result1] # text, svg
|
501
516
|
end
|
@@ -548,12 +563,17 @@ COLORS
|
|
548
563
|
end
|
549
564
|
case t
|
550
565
|
when "goat", "ditaa", "mscgen", "plantuml", "plantuml-utxt",
|
551
|
-
"railroad", "railroad-utf8", "mermaid", "
|
566
|
+
"railroad", "railroad-utf8", "mermaid", "protocol", "protocol-goat",
|
567
|
+
"math"
|
552
568
|
if gi
|
553
569
|
warn "*** Can't set GI #{gi} for composite SVG artset"
|
554
570
|
end
|
555
571
|
result, result1 = memoize(:svg_tool_process, t, result)
|
572
|
+
if result1 # refactor!
|
556
573
|
"#{' '*indent}<figure#{el_html_attributes(el)}><artset><artwork #{html_attributes(artwork_attr.merge("type"=> "svg"))}>#{result1.sub(/.*?<svg/m, "<svg")}</artwork><artwork #{html_attributes(artwork_attr.merge("type"=> "ascii-art"))}><![CDATA[#{result}#{result =~ /\n\Z/ ? '' : "\n"}]]></artwork></artset></figure>\n"
|
574
|
+
else
|
575
|
+
"#{' '*indent}<figure#{el_html_attributes(el)}><artwork #{html_attributes(artwork_attr.merge("type"=> "ascii-art"))}><![CDATA[#{result}#{result =~ /\n\Z/ ? '' : "\n"}]]></artwork></figure>\n"
|
576
|
+
end
|
557
577
|
else
|
558
578
|
gi ||= (
|
559
579
|
if !$options.v3 || !t || ARTWORK_TYPES.include?(t) || artwork_attr["align"]
|
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.11
|
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-10-
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|