kramdown-rfc2629 1.3.16 → 1.3.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1aa033b3aa4b1de04e812815fc9eff8d4aefd79ead0eaa5b72c0df9addb83f2d
4
- data.tar.gz: c95278268d3ff938b1b05283c1c865385424955999584c3170c9d5e06a1e23dc
3
+ metadata.gz: eaff5274766d9c9fe2de618bc8ed0f2d86cb1a7a9413e0de92568e1cdca2df30
4
+ data.tar.gz: e519ff100dbfbbae7881100d023ee2f370805d84c7ee9e49beadfa99b02a72d7
5
5
  SHA512:
6
- metadata.gz: 994a974bd54cc86f4eb634c6fc7ca7ce0e3ccda4cc13d8e9abbafa4276202e22d5ed7a0587757208e5a35ca7c800b813a42c94781165d784a09e1b08c1be4135
7
- data.tar.gz: 9a5bad18a176d28fcefcbfaedffca444b354345c67c88efce1bda45c98784208bf6a34e8d79df572b5992f574feecd122704bf188f24a4f532bff315a1e4084e
6
+ metadata.gz: b178e930deec32e6951277d9162453643be47fd6b87719f517ed05dd87c3e63414e7b3db1ed2258edf52b6b82fd11f07d371276c9624f17a43a3b721fef21ad6
7
+ data.tar.gz: 22d55e1830b09db10b297700021b98d110204414b79225509b59818a2feefb48a4fed9a8be2b4cfe23547f788a63f3fc7fa7535c9a027fa059ada59dd77b6d72
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.3.16'
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.}
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-rfc2629
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.16
4
+ version: 1.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann