aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/urls.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-12-03 00:22:22 -0500
committerRalph Amissah <ralph@amissah.com>2013-12-03 00:22:22 -0500
commit66fde27a84a4fca7b93d08cc7ceda19400e8f9ad (patch)
treeef79701befa531e39db4588814204ff641cf800b /lib/sisu/v5/urls.rb
parentv5: plaintext, smarttext: asciidoc (diff)
v5: plaintext, smarttext: markdown
Diffstat (limited to 'lib/sisu/v5/urls.rb')
-rw-r--r--lib/sisu/v5/urls.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sisu/v5/urls.rb b/lib/sisu/v5/urls.rb
index 4e1b3d8e..7da71137 100644
--- a/lib/sisu/v5/urls.rb
+++ b/lib/sisu/v5/urls.rb
@@ -116,6 +116,7 @@ module SiSU_Urls
't --txt (Plain-text (endnotes))'=>@fn[:plain],
' --textile (textile txt)'=>@fn[:txt_textile],
' --asciidoc (asciidoc txt)'=>@fn[:txt_asciidoc],
+ ' --markdown (markdown txt)'=>@fn[:txt_markdown],
'x --xml-sax (XML sax type)'=>@fn[:sax],
'X --xml-dom (XML dom type)'=>@fn[:dom],
' --xml-scaffold-sisu (XML scaffold)'=>@fn[:xml_scaffold_structure_sisu],
@@ -161,6 +162,9 @@ module SiSU_Urls
def asciidoc(x)
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.web_browser} file://#{@md.file.output_path.asciidoc.dir}/#{@md.file.base_filename.asciidoc}").result
end
+ def markdown(x)
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.web_browser} file://#{@md.file.output_path.markdown.dir}/#{@md.file.base_filename.markdown}").result
+ end
def epub(x)
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.epub_viewer} #{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}").result
end
@@ -326,6 +330,10 @@ module SiSU_Urls
and @opt.act[:txt_asciidoc][:set]==:on
show.asciidoc(x)
end
+ if x=~/--markdown\b/ \
+ and @opt.act[:txt_markdown][:set]==:on
+ show.markdown(x)
+ end
if x=~/--xhtml\b/ \
and @opt.act[:xhtml][:set]==:on
show.xhtml(x)