dyndoc-ruby-exec 0.2.0 → 0.2.1
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/lib/dyndoc-converter.rb +10 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea6f937cba5625004c0dd2e73b8f9ae1493633e4
|
4
|
+
data.tar.gz: 2b2bac49c8767b853627a6860b6bf686755d79aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33ecced854fb87a2bd9de278a561c4c283432c54c74d727b91de2f329ae322b1e2146bf2e2066c13c0278e5ced5d3e31bf3234d54d12d0587de216df72418335
|
7
|
+
data.tar.gz: c4900008fee19727168c03e54eec4133f614b0590f5e067526564845a4a21d04ea91d26391662fd73cbae5c25c0f1e75f4e46e279176925120820581a402539e
|
data/lib/dyndoc-converter.rb
CHANGED
@@ -149,14 +149,17 @@ module Dyndoc
|
|
149
149
|
def Converter.markdown(code)
|
150
150
|
if Dyndoc::Converter.markdown_engine == :pandoc
|
151
151
|
if Dyndoc::Converter.pandoc_available?
|
152
|
-
Dyndoc::Converter.pandoc(code)
|
152
|
+
return Dyndoc::Converter.pandoc(code)
|
153
153
|
else
|
154
154
|
Converter.markdown_engine=:redcarpet
|
155
155
|
end
|
156
156
|
end
|
157
|
-
|
158
|
-
|
159
|
-
|
157
|
+
if Dyndoc::Converter.markdown_engine == :redcarpet
|
158
|
+
Converter.redcarpet(code)
|
159
|
+
else
|
160
|
+
## default output if no available engine found
|
161
|
+
""
|
162
|
+
end
|
160
163
|
end
|
161
164
|
|
162
165
|
def Converter.convert(input,format,outputFormat,to_protect=nil)
|
@@ -173,7 +176,9 @@ module Dyndoc
|
|
173
176
|
Dyndoc::Converter.asciidoctor(code)
|
174
177
|
when "md>html"
|
175
178
|
##PandocRuby.new(code, :from => :markdown, :to => :html).convert
|
176
|
-
Dyndoc::Converter.markdown(code)
|
179
|
+
tmp=Dyndoc::Converter.markdown(code)
|
180
|
+
Dyndoc.warn :res,[code,tmp]
|
181
|
+
tmp
|
177
182
|
when "md>tex"
|
178
183
|
#puts "latex documentclass";p Dyndoc::Utils.dyndoc_globvar("_DOCUMENTCLASS_")
|
179
184
|
if Dyndoc::Utils.dyndoc_globvar("_DOCUMENTCLASS_")=="beamer"
|