From e3dee29c60b68592815153d47ec583976cf66314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Thu, 15 Jan 2015 16:13:51 +0100 Subject: [PATCH] Add an html extension to the temp file 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 https://github.com/ianks/octodown/issues/34 --- lib/octodown/support/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/octodown/support/helpers.rb b/lib/octodown/support/helpers.rb index 8302087..dc4a4f8 100644 --- a/lib/octodown/support/helpers.rb +++ b/lib/octodown/support/helpers.rb @@ -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