kramdown-rfc2629 1.6.21 → 1.6.23

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: 8c26f93c43853de6883440e6a3214201def29879da0945a42681749ffe545c1e
4
- data.tar.gz: fce8091ebcdfe69d9d96e12bca694ef8e1f66fab43ccbb6f7aeabf4f5be298f1
3
+ metadata.gz: 2e994dac31e695c4203ca35b0df65b13448c70aba486db70f298889df2167fea
4
+ data.tar.gz: 79446008180f573a09754ab1177cd39a288c834cbaadd52baba07c39f8f072a2
5
5
  SHA512:
6
- metadata.gz: b1536eaeae7bcbd548fea24c97e5a49c5482531c0ec929f410af5dda419fa4f13ed8d92cc71e2132dd931351cde97faf36d9a3ec5a57539d3c334ed4df7228d3
7
- data.tar.gz: 5370b01327233a3f027673939f2e7e15f166bc27a81c48d3f8d82976af85b3c9c2cd219fe1c3281d364f21faf33b50f467efc18136b0cdc697739f7b82baa8c3
6
+ metadata.gz: dc4410fea9b25ec15bdb246c6fc03c4af3004769e2ec39612f7fa8c834b0e5905f3df3df0a79ee95de536531e8693196cede9114d4093aa7e777d311e2f24724
7
+ data.tar.gz: 80da3cd1af86b1cc3f87d7f0a31da88778b0ed763a4792e4bda6dea06aeeff89a4a5505b6634d9db36e5f5fb0eea888160286a905ecd707da3f47e7141274405
data/README.md CHANGED
@@ -318,8 +318,8 @@ Currently supported labels as of 1.3.9:
318
318
  plaintext form is used
319
319
  * [mermaid][]: Very experimental; the conversion to SVG is prone to
320
320
  generate black-on-black text in this version
321
- * math: display math using [tex2svg][] for HTML/PDF and [asciitex][]
322
- (fork: [asciiTeX][asciiTeX-eggert]) for plaintext
321
+ * math: display math using [tex2svg][] for HTML/PDF and [utftex][]
322
+ for plaintext
323
323
 
324
324
  [goat]: https://github.com/blampe/goat
325
325
  [ditaa]: https://github.com/stathissideris/ditaa
@@ -327,8 +327,7 @@ Currently supported labels as of 1.3.9:
327
327
  [plantuml]: https://plantuml.com
328
328
  [mermaid]: https://github.com/mermaid-js/mermaid-cli
329
329
  [tex2svg]: https://github.com/mathjax/MathJax-demos-node/blob/master/direct/tex2svg
330
- [asciitex]: http://asciitex.sourceforge.net/
331
- [asciiTeX-eggert]: https://github.com/larseggert/asciiTeX
330
+ [utftex]: https://github.com/bartp5/libtexprintf
332
331
 
333
332
  Note that this feature does not play well with the CI (continuous
334
333
  integration) support in Martin Thomson's [I-D Template][], as that may
data/bin/echars ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ require 'unicode/name'
3
+ hist = Hash.new(0)
4
+ ARGF.read.each_char do |c|
5
+ hist[c] += 1 unless c.ord.between?(32, 126)
6
+ end
7
+ hist.delete("\n")
8
+ cl = "*** Latin"
9
+ hist.keys.sort.partition {|c| c =~ /\A\p{Latin}\z/}.each do |l|
10
+ puts cl unless l.empty?
11
+ l.each do |c|
12
+ puts "#{c}: U+#{"%04X %4d" % [c.ord, hist[c]]
13
+ } #{Unicode::Name.correct(c) ||
14
+ Unicode::Name.label(c)}"
15
+ end
16
+ cl = "*** Non-Latin"
17
+ end
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.6.21'
3
+ s.version = '1.6.23'
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.}
@@ -8,9 +8,11 @@ spec = Gem::Specification.new do |s|
8
8
  s.add_dependency('kramdown-parser-gfm', '~> 1.1')
9
9
  s.add_dependency('certified', '~> 1.0')
10
10
  s.add_dependency('json_pure', '~> 2.0')
11
- s.files = Dir['lib/**/*.rb'] + %w(README.md LICENSE kramdown-rfc2629.gemspec bin/kdrfc bin/kramdown-rfc bin/kramdown-rfc2629 bin/doilit bin/kramdown-rfc-extract-markdown data/kramdown-rfc2629.erb data/encoding-fallbacks.txt data/math.json bin/kramdown-rfc-cache-subseries-bibxml bin/kramdown-rfc-autolink-iref-cleanup bin/de-gfm)
11
+ s.add_dependency('unicode-name', '~> 1.0')
12
+ s.files = Dir['lib/**/*.rb'] + %w(README.md LICENSE kramdown-rfc2629.gemspec bin/kdrfc bin/kramdown-rfc bin/kramdown-rfc2629 bin/doilit bin/echars bin/kramdown-rfc-extract-markdown data/kramdown-rfc2629.erb data/encoding-fallbacks.txt data/math.json bin/kramdown-rfc-cache-subseries-bibxml bin/kramdown-rfc-autolink-iref-cleanup bin/de-gfm)
12
13
  s.require_path = 'lib'
13
- s.executables = ['kramdown-rfc', 'kramdown-rfc2629', 'doilit', 'kramdown-rfc-extract-markdown',
14
+ s.executables = ['kramdown-rfc', 'kramdown-rfc2629', 'doilit', 'echars',
15
+ 'kramdown-rfc-extract-markdown',
14
16
  'kdrfc', 'kramdown-rfc-cache-i-d-bibxml',
15
17
  'kramdown-rfc-cache-subseries-bibxml',
16
18
  'kramdown-rfc-autolink-iref-cleanup',
@@ -537,9 +537,20 @@ COLORS
537
537
  result, err, _s = Open3.capture3("kgt -l abnf -e rr#{t == "railroad" ? "text" : "utf8"}#{txt_opt}",
538
538
  stdin_data: result);
539
539
  err << err1.to_s
540
- when "math"
540
+ when "math", "math-asciitex"
541
+ math = Shellwords.escape(result)
541
542
  result1, err, _s = Open3.capture3("tex2svg --font STIX --speech=false#{svg_opt} #{Shellwords.escape(' ' << result)}");
542
- result, err1, _s = Open3.capture3("asciitex -f #{file.path}#{txt_opt}")
543
+ begin
544
+ raise Errno::ENOENT if t == "math-asciitex"
545
+ result, err1, s = Open3.capture3("utftex #{math}#{txt_opt}")
546
+ if s.exitstatus != 0
547
+ warn "** utftex: #{err1.inspect}"
548
+ raise Errno::ENOENT
549
+ end
550
+ rescue Errno::ENOENT
551
+ warn "** utftex not working, falling back to asciitex" unless t == "math-asciitex"
552
+ result, err1, _s = Open3.capture3("asciitex -f #{file.path}#{txt_opt}")
553
+ end
543
554
  err << err1
544
555
  end
545
556
  capture_croak(t, err)
@@ -609,7 +620,7 @@ COLORS
609
620
  end
610
621
  case t
611
622
  when "aasvg", "ditaa", "goat",
612
- "math", "mermaid", "mscgen",
623
+ "math", "math-asciitex", "mermaid", "mscgen",
613
624
  "plantuml", "plantuml-utxt",
614
625
  "protocol", "protocol-aasvg", "protocol-goat",
615
626
  "railroad", "railroad-utf8"
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.21
4
+ version: 1.6.23
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-01-19 00:00:00.000000000 Z
11
+ date: 2023-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: unicode-name
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.0'
69
83
  description: |-
70
84
  An RFCXML (RFC 799x) generating backend for Thomas Leitner's
71
85
  "kramdown" markdown parser. Mostly useful for RFC writers.
@@ -74,6 +88,7 @@ executables:
74
88
  - kramdown-rfc
75
89
  - kramdown-rfc2629
76
90
  - doilit
91
+ - echars
77
92
  - kramdown-rfc-extract-markdown
78
93
  - kdrfc
79
94
  - kramdown-rfc-cache-i-d-bibxml
@@ -87,6 +102,7 @@ files:
87
102
  - README.md
88
103
  - bin/de-gfm
89
104
  - bin/doilit
105
+ - bin/echars
90
106
  - bin/kdrfc
91
107
  - bin/kramdown-rfc
92
108
  - bin/kramdown-rfc-autolink-iref-cleanup