Skip to content

Commit

Permalink
Whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalossilva committed Mar 5, 2012
1 parent 95e41bf commit 616bf52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions lib/showoff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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# ")
Expand Down
19 changes: 9 additions & 10 deletions lib/showoff_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.