                        (repeat parser))))
 
 (defn register-mappings
+  "Takes a map of custom parser mappings and applies them to the parsers map."
   [mappings]
   (doseq [[function-key new-function-key] mappings]
     (register new-function-key (@parsers (name function-key)))))

        current-parsers @parsers]
    (when (contains? current-parsers ext)
      (info "Parsing" (.getPath handle))
      (let [parsed-file ((current-parsers ext) handle)]
        (info "Wrote" (.getPath parsed-file))
        parsed-file))))

(ns incise.parsers.core
  (:require [incise.parsers.helpers :refer [extension]]
            (incise [config :as conf]
                    [utils :refer [directory?]])
            [clojure.java.io :refer [file]]
            [taoensso.timbre :refer [info]])
  (:import [java.io File]))

;; A Parse is simply a record definition which may be optionally used by incise
;; parsers. All HTML parsers use it as an intermediate format which gets stored
;; in the parses atom so they can be accessed globally during the final parsing
;; step. This is particularly useful for generating tags and the like.
(defrecord Parse [^String title
                  ^String extension
                  content
