Commits

Dominic Kexel  committed 165b7c7

added :main method

  • Participants
  • Parent commits 695966d

Comments (0)

Files changed (2)

-(defproject mdclj "1.0.0-SNAPSHOT"
-  :description "FIXME: write description"
-  :dependencies [[org.clojure/clojure "1.4.0"]]
-  :dev-dependencies [[lein-eclipse "1.0.0"]])
+(defproject mdclj "0.1.0-SNAPSHOT"
+  :description "a markdown parser (and html formatter)"
+  :main mdclj.core
+  :dependencies     [[org.clojure/clojure "1.4.0"]]
+  :dev-dependencies [[lein-eclipse        "1.0.0"]])

File src/mdclj/core.clj

 
 
 (defn md2html [md]
-  (format-blocks (parse-text md)))
+  (format-blocks (parse-text md)))
+
+(defn -main [md]
+  (println (str "<html><body>" (md2html md) "</body></html>")))