     [repodoc.fathom :refer [nm]]
     [repodoc.editor :as e]
     [cljs.pprint :refer [pprint]]
+    [markdown.core :as md]
     ))
 
 (enable-console-print!)

         :start 0
         :editing #{}
         :opened #{}
         :serialized false})

(defn ^:export updatedb [fields value]
  (set! db (assoc-in db fields value))


(defn serialization
  []
  (let [serialize (querydb [:serialized])
        serializer (querydb [:serializer])]
    (if serialize
      (nm "#serialization" [(nm "div" [(nm "button.pure-button"
                                           {:onclick #(toggle-serialization)} "Close")
                                       (nm "button.pure-button"
                                           {:onclick #(set_serialize serialize-edn)} "EDN")
                                       (nm "button.pure-button"
                                           {:onclick #(set_serialize serialize-md)} "Markdown")
                                       " Click the text area and select text"])
                            (nm "textarea" (serialize-db serializer))]))))

(defn reporender
  "Render repository trees"
