Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ begin
gem.add_development_dependency "riot"
gem.add_dependency "builder"
gem.add_dependency "rack"
if RUBY_PLATFORM =~ /win32/
if RUBY_PLATFORM =~ /win32|java/
gem.add_dependency "maruku"
else
gem.add_dependency "rdiscount"
Expand Down
9 changes: 6 additions & 3 deletions lib/toto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
require 'digest'
require 'open-uri'

if RUBY_PLATFORM =~ /win32/
if RUBY_PLATFORM =~ /win32|java/
require 'maruku'
Markdown = Maruku
else
require 'rdiscount'
end
Expand Down Expand Up @@ -41,7 +40,11 @@ def to_html page, config, &blk

def markdown text
if (options = @config[:markdown])
Markdown.new(text.to_s.strip, *(options.eql?(true) ? [] : options)).to_html
if RUBY_PLATFORM =~ /win32|java/
Maruku.new(text.to_s.strip).to_html
else
Markdown.new(text.to_s.strip, *(options.eql?(true) ? [] : options)).to_html
end
else
text.strip
end
Expand Down