Browse files

Whitespace.

  • Loading branch information...
1 parent 95e41bf commit 616bf5222694fab897e4a41acfd70833d0f28204 @goncalossilva goncalossilva committed Mar 5, 2012
Showing with 10 additions and 12 deletions.
  1. +1 −2 lib/showoff.rb
  2. +9 −10 lib/showoff_utils.rb
View
3 lib/showoff.rb
@@ -78,7 +78,7 @@ def initialize(app=nil)
@asset_path = "./"
# Initialize Markdown Configuration
- MarkdownConfig::setup(settings.pres_dir)
+ #MarkdownConfig::setup(settings.pres_dir)
end
def self.pres_dir_current
@@ -145,7 +145,6 @@ def empty?
def process_markdown(name, content, static=false, pdf=false)
-
# if there are no !SLIDE markers, then make every H1 define a new slide
unless content =~ /^\<?!SLIDE/m
content = content.gsub(/^# /m, "<!SLIDE>\n# ")
View
19 lib/showoff_utils.rb
@@ -391,44 +391,43 @@ def self.create_file_if_needed(filename,force)
end
end
-# Load the configuration for the markdown engine form the showoff.json
+# Load the configuration for the markdown engine from the showoff.json
# file
module MarkdownConfig
-
- def self.setup( dir_name )
-
+ def self.setup(dir_name)
# Load markdown configuration
case ShowOffUtils.showoff_markdown(dir_name)
+
when 'rdiscount'
Tilt.prefer Tilt::RDiscountTemplate, "markdown"
+
when 'maruku'
-
Tilt.prefer Tilt::MarukuTemplate, "markdown"
# Now check if we can go for latex mode
require 'maruku'
require 'maruku/ext/math'
-
+
# Load maruku options
opts = ShowOffUtils.get_config_option(dir_name, 'maruku',
- {'use_tex' => false,
+ { 'use_tex' => false,
'png_dir' => 'images',
'html_png_url' => '/file/images/'})
if opts['use_tex']
-
MaRuKu::Globals[:html_math_output_mathml] = false
MaRuKu::Globals[:html_math_engine] = 'none'
-
MaRuKu::Globals[:html_math_output_png] = true
MaRuKu::Globals[:html_png_engine] = 'blahtex'
MaRuKu::Globals[:html_png_dir] = opts['png_dir']
MaRuKu::Globals[:html_png_url] = opts['html_png_url']
end
-
+
when 'bluecloth'
Tilt.prefer Tilt::BlueClothTemplate, "markdown"
+
else
Tilt.prefer Tilt::RedcarpetTemplate, "markdown"
+
end
end
end

0 comments on commit 616bf52

Please sign in to comment.