diff options
Diffstat (limited to 'src/clarktown/matchers/fenced_code_block.clj')
| -rw-r--r-- | src/clarktown/matchers/fenced_code_block.clj | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/clarktown/matchers/fenced_code_block.clj b/src/clarktown/matchers/fenced_code_block.clj new file mode 100644 index 0000000..9bbcdca --- /dev/null +++ b/src/clarktown/matchers/fenced_code_block.clj @@ -0,0 +1,10 @@ +(ns clarktown.matchers.fenced-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 "```"))) |
