aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-02-07 10:34:50 -0500
committerWaylan Limberg <waylan@gmail.com>2013-02-07 10:34:50 -0500
commit0a65037e120e0e14659991379648a1a4345b6981 (patch)
treeef3966bbb2312d5799400236cc328897c23b069b /tests/misc
parentd5a94c21313915ebbd50c061bf19e68ef6dee115 (diff)
downloadmarkdown-0a65037e120e0e14659991379648a1a4345b6981.tar.gz
markdown-0a65037e120e0e14659991379648a1a4345b6981.tar.bz2
markdown-0a65037e120e0e14659991379648a1a4345b6981.zip
Preserve whitespace in empty lines
Partial fix for #183. By preserving tabs at the start of empty lines in code blocks, the parser will retain those empty lines. Still does not work consistantly if the tab is missing!? Not sure why. Also added tests.
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/blank_lines_in_codeblocks.html31
-rw-r--r--tests/misc/blank_lines_in_codeblocks.txt37
2 files changed, 68 insertions, 0 deletions
diff --git a/tests/misc/blank_lines_in_codeblocks.html b/tests/misc/blank_lines_in_codeblocks.html
new file mode 100644
index 0000000..77da8e4
--- /dev/null
+++ b/tests/misc/blank_lines_in_codeblocks.html
@@ -0,0 +1,31 @@
+<p>Preserve blank lines in code blocks</p>
+<pre><code>a code block
+
+two blank lines
+
+
+three blank lines
+
+
+
+four blank lines
+
+
+
+
+five blank lines
+
+
+
+
+
+six blank lines
+
+
+
+
+
+
+End of block
+</code></pre>
+<p>End of document</p> \ No newline at end of file
diff --git a/tests/misc/blank_lines_in_codeblocks.txt b/tests/misc/blank_lines_in_codeblocks.txt
new file mode 100644
index 0000000..f2e582a
--- /dev/null
+++ b/tests/misc/blank_lines_in_codeblocks.txt
@@ -0,0 +1,37 @@
+Preserve blank lines in code blocks
+
+ a code block
+
+ two blank lines
+
+
+ three blank lines
+
+
+
+ four blank lines
+
+
+
+
+ five blank lines
+
+
+
+
+
+ six blank lines
+
+
+
+
+
+
+ End of block
+
+
+
+
+
+
+End of document \ No newline at end of file