hamdown 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/hamdown.rb +2 -2
  2. metadata +3 -3
@@ -6,7 +6,7 @@ class Hamdown
6
6
  def initialize(options={})
7
7
  file = options.delete(:file_path) { raise "you need to specify a file name" }
8
8
  @innerfile = File.open(file).read
9
- @outerfile = File.open('layout.haml').read
9
+ @outerfile = File.exists?('layout.haml') ? File.open('layout.haml').read : nil
10
10
  end
11
11
 
12
12
  def to_html(options={})
@@ -35,7 +35,7 @@ class Hamdown
35
35
  else
36
36
  html = RDiscount.new(@innerfile).to_html
37
37
  end
38
- Haml::Engine.new(@outerfile).render { html }
38
+ @outerfile ? Haml::Engine.new(@outerfile).render { html } : html
39
39
  end
40
40
 
41
41
  def timestamp
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamdown
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 12
10
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Robert Fletcher