diff options
Diffstat (limited to 'src/clarktown/renderers/quote_block.clj')
| -rw-r--r-- | src/clarktown/renderers/quote_block.clj | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/clarktown/renderers/quote_block.clj b/src/clarktown/renderers/quote_block.clj new file mode 100644 index 0000000..1a302f9 --- /dev/null +++ b/src/clarktown/renderers/quote_block.clj @@ -0,0 +1,16 @@ +(ns clarktown.renderers.quote-block + (:require + [clojure.string :as string] + [clarktown.engine :as engine])) + + +(defn render + "Renders a quote block." + [block parsers correctors] + (let [matches (re-seq #">.*" block) + blocks (->> (for [match matches] + (-> (subs match 1) + string/trim)) + (string/join "\n")) + block (engine/render blocks parsers correctors)] + (str "<blockquote>" block "</blockquote>"))) |
