Permalink
Browse files

deal with osx

  • Loading branch information...
1 parent 86e4672 commit da9898fb5a50d46d751fe14ec54301d8a1cf27c2 @erinata committed Apr 14, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 MarkdownBuild.py
View
@@ -3,6 +3,7 @@
import markdown_python
import os
import tempfile
+import subprocess
class MarkdownBuild(sublime_plugin.WindowCommand):
@@ -26,4 +27,7 @@ def run(self):
output = tempfile.NamedTemporaryFile(delete=False, suffix='.html')
output.write(html.encode('UTF-8'))
output.close()
- self.window.run_command('open_url', {"url": output.name})
+ if sublime.platform() == 'osx':
+ subprocess.call("open " + output.name, shell=True)
+ else:
+ self.window.run_command('open_url', {"url": output.name})

0 comments on commit da9898f

Please sign in to comment.