Skip to content

Commit

Permalink
Add an html extension to the temp file
Browse files Browse the repository at this point in the history
An extension can be added to the temp file (created behind the scene by `Tempfile.new`). It helps Safari recognize that the file is an HTML document.

It is a possible solution for  #34
  • Loading branch information
jlecour committed Jan 15, 2015
1 parent 1aa5f89 commit e3dee29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/octodown/support/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Helpers
# TODO: Find a better home for this logic
def self.markdown_to_html(content, options, path)
html = markdown_to_raw_html(content, options, path)
tmp = Octodown::Support::HTMLFile.new 'octodown'
tmp = Octodown::Support::HTMLFile.new ['octodown', '.html']
tmp.persistent_write html
end

Expand Down

0 comments on commit e3dee29

Please sign in to comment.