blob: 1a302f9c079f02cf31dd44da5532310e8dda0f63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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>")))
|