aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gottlieb <danny.gottlieb@gmail.com>2011-12-27 16:44:02 -0500
committerDaniel Gottlieb <danny.gottlieb@gmail.com>2011-12-27 16:44:02 -0500
commitda6f050f64b54cf81659107f24c1977fc5226cfb (patch)
tree1a09fe1a8711af3d77ab1b719b93f5dbf6d58ce4
parent5adec8b440ffc2934ee7120308f7e6e9d27b6e74 (diff)
downloadmarkdown-da6f050f64b54cf81659107f24c1977fc5226cfb.tar.gz
markdown-da6f050f64b54cf81659107f24c1977fc5226cfb.tar.bz2
markdown-da6f050f64b54cf81659107f24c1977fc5226cfb.zip
appropriately move the tests to the fenced code documentation in the extension source
-rw-r--r--markdown/extensions/fenced_code.py12
-rw-r--r--tests/extensions/fenced_code_blocks.html70
-rw-r--r--tests/extensions/fenced_code_blocks.txt80
3 files changed, 11 insertions, 151 deletions
diff --git a/markdown/extensions/fenced_code.py b/markdown/extensions/fenced_code.py
index 87cdfc8..5a50ba3 100644
--- a/markdown/extensions/fenced_code.py
+++ b/markdown/extensions/fenced_code.py
@@ -49,7 +49,17 @@ Language tags:
<pre><code class="python"># Some python code
</code></pre>
-Optionally backticks instead of tildes as per how github's code block markdown is identified.
+Optionally backticks instead of tildes as per how github's code block markdown is identified:
+
+ >>> text = '''
+ ... `````
+ ... # Arbitrary code
+ ... ~~~~~ # these tildes will not close the block
+ ... `````'''
+ >>> print markdown.markdown(text, extensions=['fenced_code'])
+ <pre><code># Arbitrary code
+ ~~~~~ # these tildes will not close the block
+ </code></pre>
Copyright 2007-2008 [Waylan Limberg](http://achinghead.com/).
diff --git a/tests/extensions/fenced_code_blocks.html b/tests/extensions/fenced_code_blocks.html
deleted file mode 100644
index 4a0a625..0000000
--- a/tests/extensions/fenced_code_blocks.html
+++ /dev/null
@@ -1,70 +0,0 @@
-Xo<pre><code>Fenced
-</code></pre>
-
-<p>Code block starting and ending with empty lines:</p>
-
-<pre><code><br /><br />Fenced
-
-
-</code></pre>
-
-<p>Indented code block containing fenced code block sample:</p>
-
-<pre><code>~~~
-Fenced
-~~~
-</code></pre>
-
-<p>Fenced code block with indented code block sample:</p>
-
-<pre><code>Some text
-
- Indented code block sample code
-</code></pre>
-
-<p>Fenced code block with long markers:</p>
-
-<pre><code>Fenced
-</code></pre>
-
-<p>Fenced code block with fenced code block markers of different length in it:</p>
-
-<pre><code>In code block
-~~~
-Still in code block
-~~~~~
-Still in code block
-</code></pre>
-
-<p>Fenced code block with Markdown header and horizontal rule:</p>
-
-<pre><code>#test
----
-</code></pre>
-
-<p>Fenced code block with link definitions, footnote definition and
-abbreviation definitions:</p>
-
-<pre><code>[example]: http://example.com/
-
-[^1]: Footnote def
-
-*[HTML]: HyperText Markup Language
-</code></pre>
-
-<pre><code>[example]: http://backticks.com/
-
-[^1]: Footnote def
-
-*[HTML]: HyperText Markup Language
-</code></pre>
-
-<pre><code>testing tildes in backticks
-
-~~~
-</code></pre>
-
-<pre><code>testing tildes in backticks
-
-```
-</code></pre>
diff --git a/tests/extensions/fenced_code_blocks.txt b/tests/extensions/fenced_code_blocks.txt
deleted file mode 100644
index be0f997..0000000
--- a/tests/extensions/fenced_code_blocks.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-~~~
-Fenced
-~~~
-
-Code block starting and ending with empty lines:
-~~~
-
-
-Fenced
-
-
-~~~
-
-Indented code block containing fenced code block sample:
-
- ~~~
- Fenced
- ~~~
-
-Fenced code block with indented code block sample:
-
-~~~
-Some text
-
- Indented code block sample code
-~~~
-
-Fenced code block with long markers:
-
-~~~~~~~~~~~~~~~~~~
-Fenced
-~~~~~~~~~~~~~~~~~~
-
-Fenced code block with fenced code block markers of different length in it:
-
-~~~~
-In code block
-~~~
-Still in code block
-~~~~~
-Still in code block
-~~~~
-
-Fenced code block with Markdown header and horizontal rule:
-
-~~~
-#test
----
-~~~
-
-Fenced code block with link definitions, footnote definition and
-abbreviation definitions:
-
-~~~
-[example]: http://example.com/
-
-[^1]: Footnote def
-
-*[HTML]: HyperText Markup Language
-~~~
-
-```
-[example]: http://backticks.com/
-
-[^1]: Footnote def
-
-*[HTML]: HyperText Markup Language
-```
-
-`````
-testing tildes in backticks
-
-~~~
-`````
-
-~~~
-testing backticks in tildes
-
-```
-~~~