summaryrefslogtreecommitdiff
path: root/src/clarktown/matchers/indented_code_block.clj
blob: b7cf563cbdb706e0b02ce7f1cd5ab3bae059feef (plain)
1
2
3
4
5
6
7
8
9
10
(ns clarktown.matchers.indented-code-block
  (:require
    [clojure.string :as string]))


(defn match?
  "Determines whether the given block is a indented code block."
  [block]
  (->> (string/split-lines block)
       (every? #(>= (count (take-while #{\space} %)) 4))))