Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

HTML referres to external .css file! #11

Open
wants to merge 5 commits into from

1 participant

@PDXIII

Hello!

I use your plug-in a lot during the day, but what always had mugged me, is the <style> tag. I prefere to have a external css file. For me it is easier if I want to use the generated html, though I only have to change the link to the css if I want a different styling.

So, if you like to, you are welcome to merge!

Greetz,
Pete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 29, 2012
  1. @PDXIII
  2. @PDXIII

    edit ignore

    PDXIII authored
  3. @PDXIII

    added preferences like suggested by dflock in the original repo's iss…

    PDXIII authored
    …ues. Change folder names from MarkdownBuild to SublimeMarkdownBuild cause that's the name of the repo
  4. @PDXIII
  5. @PDXIII

    edit README

    PDXIII authored
This page is out of date. Refresh to see the latest.
View
3  .gitignore
@@ -1,2 +1,3 @@
*.pyc
-*.rb
+*.rb
+.DS_Store
View
34 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"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]
View
BIN  Markdown.tmLanguage.cache
Binary file not shown
View
9 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><meta charset="' + charset + '">'
+ html = '<html><head><meta charset="' + charset + '">'
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 += '<style>' + styles + '</style>'
- html += "<body>" + md + "</body></html>"
+ html += '<link rel="stylesheet" type="text/css" href="' + css + '">'
+ html += "</head><body>" + md + "</body></html>"
if output_html:
html_name = os.path.splitext(file_name)[0]
View
BIN  MultiMarkdown.tmLanguage.cache
Binary file not shown
View
11 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.
Something went wrong with that request. Please try again.