kramdown-rfc2629 1.3.16 → 1.3.17
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 +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eaff5274766d9c9fe2de618bc8ed0f2d86cb1a7a9413e0de92568e1cdca2df30
|
|
4
|
+
data.tar.gz: e519ff100dbfbbae7881100d023ee2f370805d84c7ee9e49beadfa99b02a72d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b178e930deec32e6951277d9162453643be47fd6b87719f517ed05dd87c3e63414e7b3db1ed2258edf52b6b82fd11f07d371276c9624f17a43a3b721fef21ad6
|
|
7
|
+
data.tar.gz: 22d55e1830b09db10b297700021b98d110204414b79225509b59818a2feefb48a4fed9a8be2b4cfe23547f788a63f3fc7fa7535c9a027fa059ada59dd77b6d72
|
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.3.
|
|
3
|
+
s.version = '1.3.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.}
|
data/lib/kramdown-rfc2629.rb
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
# This derived work is also licensed under the MIT license, see LICENSE.
|
|
9
9
|
#++
|
|
10
10
|
#
|
|
11
|
+
require 'shellwords'
|
|
11
12
|
|
|
12
13
|
raise "sorry, 1.8 was last decade" unless RUBY_VERSION >= '1.9'
|
|
13
14
|
|
|
@@ -256,13 +257,16 @@ COLORS
|
|
|
256
257
|
plantuml = "@startuml\n#{result}\n@enduml"
|
|
257
258
|
result1, _s = Open3.capture2("plantuml -pipe -tsvg", stdin_data: plantuml);
|
|
258
259
|
result, _s = Open3.capture2("plantuml -pipe -tutxt", stdin_data: plantuml) if t == "plantuml-utxt"
|
|
260
|
+
when "math"
|
|
261
|
+
result1, _s = Open3.capture2("tex2svg --font STIX #{Shellwords.escape(' ' << result)}");
|
|
262
|
+
result, _s = Open3.capture2("asciitex -f #{file.path}")
|
|
259
263
|
end
|
|
260
264
|
# warn ["goat:", result1.inspect]
|
|
261
265
|
file.unlink
|
|
262
266
|
result1 = svg_clean(result1) unless t == "goat"
|
|
263
267
|
result1, _s = Open3.capture2("svgcheck -qa", stdin_data: result1);
|
|
264
268
|
# warn ["svgcheck:", result1.inspect]
|
|
265
|
-
[result, result1]
|
|
269
|
+
[result, result1] # text, svg
|
|
266
270
|
end
|
|
267
271
|
|
|
268
272
|
def convert_codeblock(el, indent, opts)
|
|
@@ -309,7 +313,7 @@ COLORS
|
|
|
309
313
|
end
|
|
310
314
|
end
|
|
311
315
|
case t
|
|
312
|
-
when "goat", "ditaa", "mscgen", "plantuml", "plantuml-utxt", "mermaid"
|
|
316
|
+
when "goat", "ditaa", "mscgen", "plantuml", "plantuml-utxt", "mermaid", "math"
|
|
313
317
|
result, result1 = memoize(:svg_tool_process, t, result)
|
|
314
318
|
"#{' '*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"
|
|
315
319
|
else
|