diff options
| -rw-r--r-- | resources/test/parsers/code_block_result.html | 3 | ||||
| -rw-r--r-- | src/clarktown/parsers/code_block.clj | 2 | ||||
| -rw-r--r-- | test/clarktown/core_test.clj | 10 |
3 files changed, 11 insertions, 4 deletions
diff --git a/resources/test/parsers/code_block_result.html b/resources/test/parsers/code_block_result.html index e95e481..21b9214 100644 --- a/resources/test/parsers/code_block_result.html +++ b/resources/test/parsers/code_block_result.html @@ -35,4 +35,5 @@ function markdownToHTML(markdown) { }); // And at last, join the blocks together for one big block. - return parsedBlocks.join("");</code></pre>
\ No newline at end of file + return parsedBlocks.join(""); +}</code></pre>
\ No newline at end of file diff --git a/src/clarktown/parsers/code_block.clj b/src/clarktown/parsers/code_block.clj index a5de41c..388776f 100644 --- a/src/clarktown/parsers/code_block.clj +++ b/src/clarktown/parsers/code_block.clj @@ -18,7 +18,7 @@ second) code (as-> block n (string/replace-first n #"\`\`\`(\w+)?\n" "") - (subs n 0 (- (count n) 5)) + (subs n 0 (- (count n) 4)) (string/replace n #"&" "&") (string/replace n #"<" "<") (string/replace n #">" ">") diff --git a/test/clarktown/core_test.clj b/test/clarktown/core_test.clj index da252c7..8a2ee58 100644 --- a/test/clarktown/core_test.clj +++ b/test/clarktown/core_test.clj @@ -1,4 +1,10 @@ (ns clarktown.core-test (:require - [clojure.test :refer :all] - [clarktown.core :refer :all]))
\ No newline at end of file + [clojure.test :refer [deftest testing is]] + [clarktown.core :as core])) + + +(deftest overall-test + (testing "Overall" + (is (= (slurp "./resources/test/core_result.html") + (core/render (slurp "./resources/test/core.md"))))))
\ No newline at end of file |
