aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xfilters/html-converters/md2html15
1 files changed, 9 insertions, 6 deletions
diff --git a/filters/html-converters/md2html b/filters/html-converters/md2html
index 138713d..1488f48 100755
--- a/filters/html-converters/md2html
+++ b/filters/html-converters/md2html
@@ -1,5 +1,7 @@
-#!/bin/sh
-cat <<_EOF
+#!/usr/bin/env python
+import markdown
+import sys
+print('''
<style>
.markdown-body {
font-size: 14px;
@@ -277,7 +279,8 @@ cat <<_EOF
border: none;
}
</style>
-_EOF
-echo "<div class='markdown-body'>"
-markdown_py -o html5
-echo "</div>"
+''')
+print("<div class='markdown-body'>")
+# Note: you may want to run this through bleach for sanitization
+markdown.markdownFromFile(input=sys.stdin, output_format="html5")
+print("</div>")
ght .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#ifndef UI_TREE_H
#define UI_TREE_H

extern void cgit_print_tree(const char *rev, char *path);

#endif /* UI_TREE_H */