Permalink
Browse files

deal with linux

  • Loading branch information...
1 parent da9898f commit 229de999b0ab0f449dfc2ca5b30c57f6717f5814 @erinata committed Apr 14, 2012
Showing with 13 additions and 7 deletions.
  1. +6 −4 MarkdownBuild.py
  2. +1 −1 README.md
  3. +1 −1 markdown.css
  4. +2 −1 messages.json
  5. +3 −0 messages/0.2.1.txt
View
10 MarkdownBuild.py
@@ -4,6 +4,7 @@
import os
import tempfile
import subprocess
+import webbrowser
class MarkdownBuild(sublime_plugin.WindowCommand):
@@ -27,7 +28,8 @@ def run(self):
output = tempfile.NamedTemporaryFile(delete=False, suffix='.html')
output.write(html.encode('UTF-8'))
output.close()
- if sublime.platform() == 'osx':
- subprocess.call("open " + output.name, shell=True)
- else:
- self.window.run_command('open_url', {"url": output.name})
+ webbrowser.open("file://" + output.name)
+ #if sublime.platform() == 'osx':
+ # subprocess.call("open " + output.name, shell=True)
+ #else:
+ # self.window.run_command('open_url', {"url": output.name})
View
2 README.md
@@ -1,4 +1,4 @@
-# Sublime Markdown (version 0.2.0)
+# Sublime Markdown (version 0.2.1)
This is a Sublime Text plugin for building markdown.
View
2 markdown.css
@@ -14,7 +14,7 @@ body{
line-height: 1.5;
margin: 2em 3em;
text-align:left;
- padding: 0 350px 0 350px;
+ padding: 0 100px 0 100px;
}
pre{
View
3 messages.json
@@ -1,3 +1,4 @@
{
- "0.2.0": "messages/0.2.0.txt"
+ "0.2.0": "messages/0.2.0.txt",
+ "0.2.1": "messages/0.2.1.txt"
}
View
3 messages/0.2.1.txt
@@ -0,0 +1,3 @@
+SublimeMarkdownBuild 0.2.1
+
+- make it work in linux

0 comments on commit 229de99

Please sign in to comment.