X-Git-Url: http://nitlanguage.org diff --git a/lib/markdown/test_markdown.nit b/lib/markdown/test_markdown.nit index e4bd177..53c355f 100644 --- a/lib/markdown/test_markdown.nit +++ b/lib/markdown/test_markdown.nit @@ -578,6 +578,44 @@ print "Hello World!" assert res == exp end + fun test_process_code_ext6 do + var test = """ +~~~ +print "Hello" +~~~ +~~~ +print "World" +~~~ +""" + var exp = """ +
print "Hello"
+
+print "World"
+
+"""
+ var res = test.md_to_html.write_to_string
+ assert res == exp
+ end
+
+ fun test_process_code_ext7 do
+ var test = """
+~~~
+print "Hello"
+~~~
+~~~
+print "World"
+~~~
+"""
+ var exp = """
+print "Hello"
+
+print "World"
+
+"""
+ var res = test.md_to_html.write_to_string
+ assert res == exp
+ end
+
fun test_process_nesting1 do
var test = """
> ## This is a header.
@@ -776,6 +814,36 @@ This is an image in a regular paragraph.
assert res == exp
end
+ fun test_process_xml4 do
+ var test = """
+This is an example of a block element that should be escaped.
+Idem for the second paragraph.
+""" + var exp = test + var res = test.md_to_html.write_to_string + assert res == exp + end + + fun test_process_xml5 do + var test = """ +# Some more XML tests + +This is an example of a block element that should be escaped.
+Idem for the second paragraph.
+ +With a *md paragraph*! +""" + var exp = """ +This is an example of a block element that should be escaped.
+Idem for the second paragraph.
+With a md paragraph!
+""" + var res = test.md_to_html.write_to_string + print res + assert res == exp + end + fun test_process_span_code1 do var test = "Use the `printf()` function." var exp = "Use the printf()
function.