summaryrefslogtreecommitdiff
path: root/src/clarktown/matchers/list_block.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/clarktown/matchers/list_block.clj')
-rw-r--r--src/clarktown/matchers/list_block.clj10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/clarktown/matchers/list_block.clj b/src/clarktown/matchers/list_block.clj
new file mode 100644
index 0000000..a37b06e
--- /dev/null
+++ b/src/clarktown/matchers/list_block.clj
@@ -0,0 +1,10 @@
+(ns clarktown.matchers.list-block
+ (:require
+ [clojure.string :as string]))
+
+
+(defn match?
+ "Determines whether we're dealing with a list block or not."
+ [block]
+ (->> (string/trim block)
+ (re-matches #"(?s)^(\d\.\s|\*{1}\s|\-{1}\s).*$"))) \ No newline at end of file