diff --git a/.gitignore b/.gitignore index d96ec97..eeb9568 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc -*.rb \ No newline at end of file +*.rb +.DS_Store \ No newline at end of file diff --git a/Main.sublime-menu b/Main.sublime-menu new file mode 100644 index 0000000..70ec1e4 --- /dev/null +++ b/Main.sublime-menu @@ -0,0 +1,34 @@ +[ + { + "caption": "Preferences", + "mnemonic": "n", + "id": "preferences", + "children": + [ + { + "caption": "Package Settings", + "mnemonic": "P", + "id": "package-settings", + "children": + [ + { + "caption": "SublimeMarkdownBuild", + "children": + [ + { + "command": "open_file", + "args": { "file": "${packages}/SublimeMarkdownBuild/MarkdownBuild.sublime-settings" }, + "caption": "Settings - Default" + }, + { + "command": "open_file", + "args": { "file": "${packages}/User/MarkdownBuild.sublime-settings" }, + "caption": "Settings - User" + } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/Markdown.tmLanguage.cache b/Markdown.tmLanguage.cache new file mode 100644 index 0000000..85bce93 Binary files /dev/null and b/Markdown.tmLanguage.cache differ diff --git a/MarkdownBuild.py b/MarkdownBuild.py index 3a8372f..997d2cb 100644 --- a/MarkdownBuild.py +++ b/MarkdownBuild.py @@ -28,13 +28,12 @@ def run(self): return contents = view.substr(sublime.Region(0, view.size())) md = markdown_python.markdown(contents) - html = '' + html = '' if use_css: - css = os.path.join(sublime.packages_path(), 'MarkdownBuild', 'markdown.css') + css = os.path.join(sublime.packages_path(), 'SublimeMarkdownBuild', 'markdown.css') if (os.path.isfile(css)): - styles = open(css, 'r').read() - html += '' - html += "" + md + "" + html += '' + html += "" + md + "" if output_html: html_name = os.path.splitext(file_name)[0] diff --git a/MultiMarkdown.tmLanguage.cache b/MultiMarkdown.tmLanguage.cache new file mode 100644 index 0000000..49014b3 Binary files /dev/null and b/MultiMarkdown.tmLanguage.cache differ diff --git a/README.md b/README.md index e3ae056..1286b83 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ +#SublimeMarkdownBuild (version 0.5.0) +Based on the original [MarkdownBuild by erinata](https://github.com/erinata/SublimeMarkdownBuild) + +Works like the original, but differs in the following + ++ It's named SublimeMarkdownBuild, because that's the name of the original repo and I had some errors when I renamed it. ++ It has an preferences entry like [suggested by deflock in the original open issues.](https://github.com/erinata/SublimeMarkdownBuild/issues/2) ++ The styles are not included into the HTML via style-tag. Now the HTML referes to the external markdown.css. + +In addition you can read the original README: + # MarkdownBuild (version 0.4.0) This is a Sublime Text plugin for building markdown into html and open it in browser.