summaryrefslogtreecommitdiff
path: root/src/clarktown/matchers/code_block.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/clarktown/matchers/code_block.clj')
-rw-r--r--src/clarktown/matchers/code_block.clj10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/clarktown/matchers/code_block.clj b/src/clarktown/matchers/code_block.clj
new file mode 100644
index 0000000..655c951
--- /dev/null
+++ b/src/clarktown/matchers/code_block.clj
@@ -0,0 +1,10 @@
+(ns clarktown.matchers.code-block
+ (:require
+ [clojure.string :as string]))
+
+
+(defn match?
+ "Determines whether we're dealing with a code block."
+ [block]
+ (and (string/starts-with? block "```")
+ (string/ends-with? block "```"))) \ No newline at end of file