diff options
| author | Asko Nõmm <ano@ano.ee> | 2022-05-12 21:09:38 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-12 21:09:38 +0300 |
| commit | 2ff0da12f58d17b6c1ab3736a41595073b3a534e (patch) | |
| tree | 52dab7ba9cb71ca06c334cada0b8fc2c99c3fb91 /src/clarktown/engine.clj | |
| parent | 94c1c0ca639f55ff9073cb1fdf2ad6015bb6bae1 (diff) | |
| parent | dc2a364db6d14d4afa9da9aadbccb8fdbb038fe4 (diff) | |
Merge pull request #31 from askonomm/7-support-indented-code-blocks
Implement indented code blocks.
Diffstat (limited to 'src/clarktown/engine.clj')
| -rw-r--r-- | src/clarktown/engine.clj | 8 |
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 |
