From 52203a49aa544b2c11c96445d8732893160c436b Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Tue, 19 Apr 2022 17:50:19 +0300 Subject: WIP #16 Pretty much done. Needs more testing. And new documentation. --- src/clarktown/parsers/quote_block.clj | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/clarktown/parsers/quote_block.clj (limited to 'src/clarktown/parsers/quote_block.clj') diff --git a/src/clarktown/parsers/quote_block.clj b/src/clarktown/parsers/quote_block.clj deleted file mode 100644 index ff2dda8..0000000 --- a/src/clarktown/parsers/quote_block.clj +++ /dev/null @@ -1,24 +0,0 @@ -(ns clarktown.parsers.quote-block - (:require - [clojure.string :as string] - [clarktown.parser :as parser])) - - -(defn is? - "Determines whether the given block is a quote block." - [block] - (-> (string/replace block #"\n" "") - string/trim - (string/starts-with? ">"))) - - -(defn render - "Renders a quote block." - [block parsers] - (let [matches (re-seq #">.*" block) - blocks (->> (for [match matches] - (-> (subs match 1) - string/trim)) - (string/join "\n")) - block (parser/parse blocks parsers)] - (str "
" block "
"))) -- cgit v1.2.3