dyndoc-ruby-exec 0.2.2 → 0.2.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dyndoc-converter.rb +17 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e83a3581e6d53658a5a6494d2a7ab96d7b2c2d96
4
- data.tar.gz: a012dcb1a202cbd9899563b6cf34ba04b3338a37
3
+ metadata.gz: 34dbba17cedea123ba5104798869135749d3c20b
4
+ data.tar.gz: 8ab595919285e91623c20c88cbe8ea8c9fb61b7b
5
5
  SHA512:
6
- metadata.gz: 8cfe02d3e1927a3cad2b1f4c9e34865b0e00f68ce05e9706f91888c5850577cacedbf58fe165335e41a632d3c79a7680c2cb52b5fd1ebb4613e9f49876880106
7
- data.tar.gz: 84fe55b113ccd189315dff475a7c554d94c2d3f1bbde779673c1cd6aaa7bfff8dbf53470ab6c4d3903b6ad98cf1889d74c77b802f5316bbffb973ec93b6b16b6
6
+ metadata.gz: 52f0c083f4d1a72ed3ffd20be4ad88862974ba6301fa654f4c94f8195bf1afde8779effc69139be5dc5f44666242b1d163010516b999287d50d5aa87972107e5
7
+ data.tar.gz: e41ff5c4fb57dde0a0a6211c5576a126d630c9352df5a1b5d02fa7495ecc3c6ec082d5fd40e9c0fbc5eb070a52e572c8d2de7d1ef0308c33d5cb275a4c433bd6
@@ -24,6 +24,20 @@ module Dyndoc
24
24
 
25
25
  SOFTWARE={}
26
26
 
27
+ @@tags=[]
28
+
29
+ def Converter.tags
30
+ @@tags
31
+ end
32
+
33
+ def Converter.tags?(tag)
34
+ @@tags.include? tag
35
+ end
36
+
37
+ def Converter.tag!(tag)
38
+ @@tags=(@@tags+[tag]).uniq
39
+ end
40
+
27
41
  def Converter.mathlink(input)
28
42
  unless SOFTWARE[:mathlink]
29
43
  cmd=`type "math"`
@@ -175,6 +189,7 @@ module Dyndoc
175
189
  if i%2==0
176
190
  res << case format+outputFormat
177
191
  when "adoc>html"
192
+ Dyndoc::Converter.tag!(:adoc)
178
193
  Dyndoc::Converter.asciidoctor(code)
179
194
  when "md>html"
180
195
  ## DEBUG MODE
@@ -182,6 +197,7 @@ module Dyndoc
182
197
  ##Dyndoc.warn :res,[code,tmp]
183
198
  ##tmp
184
199
  ## Normal Mode
200
+ Dyndoc::Converter.tag!(:md)
185
201
  Dyndoc::Converter.markdown(code)
186
202
  when "md>tex"
187
203
  #puts "latex documentclass";p Dyndoc::Utils.dyndoc_globvar("_DOCUMENTCLASS_")
@@ -202,6 +218,7 @@ module Dyndoc
202
218
  # RedCloth.new(code).to_latex
203
219
  Dyndoc::Converter.pandoc(code,"-f textile -t latex")
204
220
  when "ttm>html"
221
+ Dyndoc::Converter.tag!(:ttm)
205
222
  Dyndoc::Converter.ttm(code,"-e2 -r -y1 -L").gsub(/<mtable[^>]*>/,"<mtable>").gsub("\\ngtr","<mtext>&ngtr;</mtext>").gsub("\\nless","<mtext>&nless;</mtext>").gsub("&#232;","<mtext>&egrave;</mtext>")
206
223
  when "tex>odt"
207
224
  puts "tex => odt"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyndoc-ruby-exec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - CQLS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-28 00:00:00.000000000 Z
11
+ date: 2017-01-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Converters and software for dyndoc.