about summary refs log tree commit diff stats
path: root/gemtohtm
diff options
context:
space:
mode:
Diffstat (limited to 'gemtohtm')
-rw-r--r--gemtohtm5
1 files changed, 5 insertions, 0 deletions
diff --git a/gemtohtm b/gemtohtm
new file mode 100644
index 0000000..0f0d038
--- /dev/null
+++ b/gemtohtm
@@ -0,0 +1,5 @@
+$1 == "#" { print "<h1>", $0, "</h1>"; next}
+$1 == "##" { print "<h2>", $0, "</h2>"; next}
+$1 == "###" { print "<h3>", $0, "</h3>"; next}
+$1 == "=>" { print "<a href=\"", $2, "\">" substr($0,index($0,$3)), "</a>"; next}
+{ print }