Commits

Steve Losh committed 5f14091

Add syntax highlighting with Pygments.

Comments (0)

Files changed (3)

bookmarkdown/bookmarkdown

     'ga_id': getattr(config, 'ga_id', ''),
     'gauges_id': getattr(config, 'gauges_id', ''),
 }
-md = markdown.Markdown(extensions=['toc'], safe_mode=False)
+md = markdown.Markdown(extensions=['toc', 'codehilite'], safe_mode=False)
 # }}}
 
 # Utilities -------------------------------------------------------------------

bookmarkdown/static/styles/tango.css

+.codehilite .hll { background-color: #ffffcc }
+.codehilite .c { color: #8f5902; font-style: italic } /* Comment */
+.codehilite .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.codehilite .g { color: #000000 } /* Generic */
+.codehilite .k { color: #204a87; font-weight: bold } /* Keyword */
+.codehilite .l { color: #000000 } /* Literal */
+.codehilite .n { color: #000000 } /* Name */
+.codehilite .o { color: #ce5c00; font-weight: bold } /* Operator */
+.codehilite .x { color: #000000 } /* Other */
+.codehilite .p { color: #000000; font-weight: bold } /* Punctuation */
+.codehilite .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.codehilite .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */
+.codehilite .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.codehilite .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.codehilite .gd { color: #a40000 } /* Generic.Deleted */
+.codehilite .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #ef2929 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #000000; font-style: italic } /* Generic.Output */
+.codehilite .gp { color: #8f5902 } /* Generic.Prompt */
+.codehilite .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.codehilite .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
+.codehilite .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
+.codehilite .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
+.codehilite .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
+.codehilite .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
+.codehilite .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
+.codehilite .ld { color: #000000 } /* Literal.Date */
+.codehilite .m { color: #0000cf; font-weight: bold } /* Literal.Number */
+.codehilite .s { color: #4e9a06 } /* Literal.String */
+.codehilite .na { color: #c4a000 } /* Name.Attribute */
+.codehilite .nb { color: #204a87 } /* Name.Builtin */
+.codehilite .nc { color: #000000 } /* Name.Class */
+.codehilite .no { color: #000000 } /* Name.Constant */
+.codehilite .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
+.codehilite .ni { color: #ce5c00 } /* Name.Entity */
+.codehilite .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.codehilite .nf { color: #000000 } /* Name.Function */
+.codehilite .nl { color: #f57900 } /* Name.Label */
+.codehilite .nn { color: #000000 } /* Name.Namespace */
+.codehilite .nx { color: #000000 } /* Name.Other */
+.codehilite .py { color: #000000 } /* Name.Property */
+.codehilite .nt { color: #204a87; font-weight: bold } /* Name.Tag */
+.codehilite .nv { color: #000000 } /* Name.Variable */
+.codehilite .ow { color: #204a87; font-weight: bold } /* Operator.Word */
+.codehilite .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
+.codehilite .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
+.codehilite .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */
+.codehilite .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */
+.codehilite .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */
+.codehilite .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.codehilite .sc { color: #4e9a06 } /* Literal.String.Char */
+.codehilite .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.codehilite .s2 { color: #4e9a06 } /* Literal.String.Double */
+.codehilite .se { color: #4e9a06 } /* Literal.String.Escape */
+.codehilite .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.codehilite .si { color: #4e9a06 } /* Literal.String.Interpol */
+.codehilite .sx { color: #4e9a06 } /* Literal.String.Other */
+.codehilite .sr { color: #4e9a06 } /* Literal.String.Regex */
+.codehilite .s1 { color: #4e9a06 } /* Literal.String.Single */
+.codehilite .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.codehilite .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.codehilite .vc { color: #000000 } /* Name.Variable.Class */
+.codehilite .vg { color: #000000 } /* Name.Variable.Global */
+.codehilite .vi { color: #000000 } /* Name.Variable.Instance */
+.codehilite .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
+

bookmarkdown/templates/base.html

         <link href="/static/styles/skeleton/skeleton.css" rel="stylesheet" type="text/css" />
         <link href="/static/styles/skeleton/layout.css" rel="stylesheet" type="text/css" />
 
+        <link href="/static/styles/tango.css" rel="stylesheet" type="text/css" />
         <link href="/static/styles/style.less" rel="stylesheet/less" type="text/css" />
 
         <script type="text/javascript" src="/static/scripts/less.js"></script>