summaryrefslogtreecommitdiff
path: root/src/clarktown/engine.clj
diff options
context:
space:
mode:
authorAsko Nõmm <ano@ano.ee>2022-05-11 20:42:30 +0300
committerAsko Nõmm <ano@ano.ee>2022-05-11 20:42:30 +0300
commit7c3eba77fd3de0e108efba94018233a57e66989e (patch)
treeae7e3c28a7b097d9dffd60a005c96fdb9758f039 /src/clarktown/engine.clj
parent94c1c0ca639f55ff9073cb1fdf2ad6015bb6bae1 (diff)
Implement indented code blocks.
Diffstat (limited to 'src/clarktown/engine.clj')
-rw-r--r--src/clarktown/engine.clj8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/clarktown/engine.clj b/src/clarktown/engine.clj
index 5eb22d5..dc07e9f 100644
--- a/src/clarktown/engine.clj
+++ b/src/clarktown/engine.clj
@@ -70,7 +70,7 @@
(defn- remove-excess-newlines
- "Replaces all occurences of 3 or more concecutive newlines into
+ "Replaces all occurrences of 3 or more consecutive newlines into
two newlines."
[markdown]
(string/replace markdown #"\n{3,}" "\n\n"))
@@ -133,10 +133,8 @@
[blocks given-parsers given-correctors]
(for [block blocks]
(if-let [parser (find-parser-by-block given-parsers block)]
- (->> (string/trim block)
- (parse-block-with-known-parser parser given-parsers given-correctors))
- (->> (string/trim block)
- (parse-block-with-unknown-parsers given-parsers given-correctors)))))
+ (parse-block-with-known-parser parser given-parsers given-correctors block)
+ (parse-block-with-unknown-parsers given-parsers given-correctors block))))
(defn render