summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resources/test/core.md2
-rw-r--r--resources/test/core_result.html2
-rw-r--r--test/clarktown/parsers/strikethrough_test.clj14
3 files changed, 16 insertions, 2 deletions
diff --git a/resources/test/core.md b/resources/test/core.md
index 1770f21..6c476a9 100644
--- a/resources/test/core.md
+++ b/resources/test/core.md
@@ -55,7 +55,7 @@ This is ___bold italic text___ and ***this is also***. *What about italic text t
## Hi there, world!
* List item
-* Another list item
+* Another list ~~item~~
* Sub list item
* Another sub list item
* Sub sub list item
diff --git a/resources/test/core_result.html b/resources/test/core_result.html
index 0f242a7..bf9cc55 100644
--- a/resources/test/core_result.html
+++ b/resources/test/core_result.html
@@ -46,7 +46,7 @@ function markdownToHTML(markdown) {
<h2>Hi there, world!</h2>
-<ul><li>List item</li><li>Another list item<ul><li>Sub list item</li><li>Another sub list item<ul><li>Sub sub list item</li><li>Continuing sub list item</li></ul></li></ul></li><li>Continuing list item</li></ul>
+<ul><li>List item</li><li>Another list <del>item</del><ul><li>Sub list item</li><li>Another sub list item<ul><li>Sub sub list item</li><li>Continuing sub list item</li></ul></li></ul></li><li>Continuing list item</li></ul>
<hr>
diff --git a/test/clarktown/parsers/strikethrough_test.clj b/test/clarktown/parsers/strikethrough_test.clj
new file mode 100644
index 0000000..fdf6188
--- /dev/null
+++ b/test/clarktown/parsers/strikethrough_test.clj
@@ -0,0 +1,14 @@
+(ns clarktown.parsers.strikethrough-test
+ (:require
+ [clojure.test :refer [deftest testing is]]
+ [clarktown.parsers.strikethrough :as strikethrough]))
+
+
+(deftest strikethrough-test
+ (testing "Creating strikethrough text"
+ (is (= (strikethrough/render "~~This is strikethrough text.~~" nil)
+ "<del>This is strikethrough text.</del>")))
+
+ (testing "Creating strikethrough text mixed with regular text"
+ (is (= (strikethrough/render "Some other text, ~~This is strikethrough text.~~ And more text." nil)
+ "Some other text, <del>This is strikethrough text.</del> And more text.")))) \ No newline at end of file