summaryrefslogtreecommitdiff
path: root/src/clarktown
diff options
context:
space:
mode:
authorAsko Nõmm <asko@bien.ee>2022-04-23 01:33:27 +0300
committerAsko Nõmm <asko@bien.ee>2022-04-23 01:33:27 +0300
commit1cf289f67927c7e06cba818c00383ce1aae8ad67 (patch)
treebf70cb4afa767c1678657ed93fc011371e7a3a38 /src/clarktown
parent2b530b7c4e53596ce17e24f3fab42ab2f3c52ba8 (diff)
No need for `let` here
Diffstat (limited to 'src/clarktown')
-rw-r--r--src/clarktown/correctors/code_block.clj16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/clarktown/correctors/code_block.clj b/src/clarktown/correctors/code_block.clj
index fcda19b..9b2f0f3 100644
--- a/src/clarktown/correctors/code_block.clj
+++ b/src/clarktown/correctors/code_block.clj
@@ -5,14 +5,14 @@
(defn empty-line-above?
[lines line index]
- (let [occurences (->> (take index lines)
- (filter #(string/starts-with? (string/trim %) "```"))
- count)]
- (and (string/starts-with? (string/trim line) "```")
- (> index 0)
- (even? occurences)
- (not (= (-> (nth lines (- index 1))
- string/trim) "")))))
+ (and (string/starts-with? (string/trim line) "```")
+ (> index 0)
+ (->> (take index lines)
+ (filter #(string/starts-with? (string/trim %) "```"))
+ count
+ even?)
+ (not (= (-> (nth lines (- index 1))
+ string/trim) ""))))
(defn empty-line-below?