Skip to content

Commit

Permalink
Merge pull request #5 from cespare/master
Browse files Browse the repository at this point in the history
Ship our own styles
  • Loading branch information
dmac committed Feb 23, 2012
2 parents 97bea1e + e116605 commit 5bbdfb6
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 13 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Original file line Diff line number Diff line change
@@ -1,10 +1,10 @@
# Markdown Doctor # Markdown Doctor


An absurdly simple script that ganks github styles for your markdown. An absurdly simple script that renders your markdown to html.


### Installation ### Installation


markdown_doctor uses pygments for syntax highlighting code blocks. Markdown Doctor uses pygments for syntax highlighting code blocks.


$ pip install pygments $ pip install pygments
$ gem install markdown_doctor $ gem install markdown_doctor
Expand All @@ -28,4 +28,3 @@ Try putting this in your `.vimrc`:


" Quickly display a markdown preview of the current buffer " Quickly display a markdown preview of the current buffer
:map <leader>m :%w ! markdown_doctor \| bcat<CR><CR> :map <leader>m :%w ! markdown_doctor \| bcat<CR><CR>

238 changes: 229 additions & 9 deletions bin/markdown_doctor
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,18 +6,238 @@ require "nokogiri"
require "pygments.rb" require "pygments.rb"


HEADER = <<EOF HEADER = <<EOF
<link href="http://assets.github.com/stylesheets/bundles/github-92243db0daab07aa944d353c1ba062b9581bd321.css"
type="text/css" rel="stylesheet" />
<link href="http://assets.github.com/stylesheets/bundles/github2-b4eff0bfa63304403db18c61e84e5af78b005dab.css"
type="text/css" rel="stylesheet" />
<style type="text/css"> <style type="text/css">
#main-wrapper { a {
width: 920px; color: #4183C4;
margin: 0 auto; text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1 {
border-bottom: 3px solid #ccc;
padding-bottom: 10px;
}
body {
font: 14px / 20px "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
}
pre, code {
font-family: "Ubuntu Mono", Courier, monospace;
background-color: #F0EEEA;
padding: 2px;
}
.highlight pre {
padding-left: 6px;
}
#wrapper {
width: 900px;
margin: 50px auto;
border: 3px solid #ccc;
padding: 0px 15px;
}
pre .hll {
background-color: #ffffcc;
}
pre .c {
color: #408080;
font-style: italic;
}
pre .k {
color: #5d2846;
font-weight: bold;
}
pre .o {
color: #666666;
}
pre .cm {
color: #408080;
font-style: italic;
}
pre .cp {
color: #bc7a00;
}
pre .c1 {
color: #408080;
font-style: italic;
}
pre .cs {
color: #408080;
font-style: italic;
}
pre .gd {
color: #a00000;
}
pre .ge {
font-style: italic;
}
pre .gr {
color: #ff0000;
}
pre .gh {
color: #000080;
font-weight: bold;
}
pre .gi {
color: #00a000;
}
pre .go {
color: #808080;
}
pre .gp {
color: #000080;
font-weight: bold;
}
pre .gs {
font-weight: bold;
}
pre .gu {
color: #800080;
font-weight: bold;
}
pre .gt {
color: #0040d0;
}
pre .kc {
color: #5d2846;
font-weight: bold;
}
pre .kd {
color: #5d2846;
font-weight: bold;
}
pre .kn {
color: #5d2846;
font-weight: bold;
}
pre .kp {
color: #5d2846;
}
pre .kr {
color: #5d2846;
font-weight: bold;
}
pre .kt {
color: #b00040;
}
pre .m {
color: #666666;
}
pre .s {
color: #4eb25a;
}
pre .na {
color: #7d9029;
}
pre .nb {
color: #5d2846;
}
pre .nc {
color: #3333a0;
font-weight: bold;
}
pre .no {
color: #28732c;
}
pre .nd {
color: #aa22ff;
}
pre .ni {
color: #999999;
font-weight: bold;
}
pre .ne {
color: #d2413a;
font-weight: bold;
}
pre .nf {
color: #3333a0;
}
pre .nl {
color: #a0a000;
}
pre .nn {
color: #3333a0;
font-weight: bold;
}
pre .nt {
color: #5d2846;
font-weight: bold;
}
pre .nv {
color: #353c92;
}
pre .ow {
color: #aa22ff;
font-weight: bold;
}
pre .w {
color: #bbbbbb;
}
pre .mf {
color: #666666;
}
pre .mh {
color: #666666;
}
pre .mi {
color: #666666;
}
pre .mo {
color: #666666;
}
pre .sb {
color: #4eb25a;
}
pre .sc {
color: #4eb25a;
}
pre .sd {
color: #4eb25a;
font-style: italic;
}
pre .s2 {
color: #4eb25a;
}
pre .se {
color: #bb6622;
font-weight: bold;
}
pre .sh {
color: #4eb25a;
}
pre .si {
color: #bb6688;
font-weight: bold;
}
pre .sx {
color: #5d2846;
}
pre .sr {
color: #bb6688;
}
pre .s1 {
color: #4eb25a;
}
pre .ss {
color: #353c92;
}
pre .bp {
color: #5d2846;
}
pre .vc {
color: #353c92;
}
pre .vg {
color: #353c92;
}
pre .vi {
color: #353c92;
}
pre .il {
color: #666666;
} }
</style> </style>
<div id="main-wrapper"> <div id="wrapper">
<div class="markdown-body">
EOF EOF


FOOTER = <<EOF FOOTER = <<EOF
Expand Down
2 changes: 1 addition & 1 deletion markdown_doctor.gemspec
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "markdown_doctor" s.name = "markdown_doctor"
s.version = "0.3.0" s.version = "0.4.0"


s.required_rubygems_version = Gem::Requirement.new(">=0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">=0") if s.respond_to? :required_rubygems_version=
s.specification_version = 2 if s.respond_to? :specification_version= s.specification_version = 2 if s.respond_to? :specification_version=
Expand Down

0 comments on commit 5bbdfb6

Please sign in to comment.