diff options
author | Waylan Limberg <waylan@gmail.com> | 2011-05-22 18:07:34 -0700 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2011-05-22 18:07:34 -0700 |
commit | 17a56ae4318055dd1952433d23e25eaa1e4b2cfa (patch) | |
tree | e3298452c02ec4c6d3e3001a495d8900816c4213 | |
parent | d43c3deeb389ff8abd74b0605939b3477eaf6a9c (diff) | |
parent | be0a34d705eecd6ed13c67558f17626597ba6603 (diff) | |
download | markdown-17a56ae4318055dd1952433d23e25eaa1e4b2cfa.tar.gz markdown-17a56ae4318055dd1952433d23e25eaa1e4b2cfa.tar.bz2 markdown-17a56ae4318055dd1952433d23e25eaa1e4b2cfa.zip |
Merge pull request #10 from zerok/master
New HTML5 block elements
-rw-r--r-- | markdown/util.py | 4 | ||||
-rw-r--r-- | tests/misc/block_html5.html | 16 | ||||
-rw-r--r-- | tests/misc/block_html5.txt | 14 |
3 files changed, 33 insertions, 1 deletions
diff --git a/markdown/util.py b/markdown/util.py index 8e950b9..1b55de4 100644 --- a/markdown/util.py +++ b/markdown/util.py @@ -18,7 +18,9 @@ Constants you might want to modify BLOCK_LEVEL_ELEMENTS = re.compile("p|div|h[1-6]|blockquote|pre|table|dl|ol|ul" "|script|noscript|form|fieldset|iframe|math" "|ins|del|hr|hr/|style|li|dt|dd|thead|tbody" - "|tr|th|td") + "|tr|th|td|section|footer|header|group|figure" + "|figcaption|aside|article|canvas|output" + "|progress|video") # Placeholders STX = u'\u0002' # Use STX ("Start of text") for start-of-placeholder ETX = u'\u0003' # Use ETX ("End of text") for end-of-placeholder diff --git a/tests/misc/block_html5.html b/tests/misc/block_html5.html new file mode 100644 index 0000000..b7a2fd3 --- /dev/null +++ b/tests/misc/block_html5.html @@ -0,0 +1,16 @@ +<section> + <header> + <hgroup> + <h1>Hello :-)</h1> + </hgroup> + </header> + <figure> + <img src="image.png" alt="" /> + <figcaption>Caption</figcaption> + </figure> + <footer> + <p>Some footer</p> + </footer> +</section> + +<figure></figure>
\ No newline at end of file diff --git a/tests/misc/block_html5.txt b/tests/misc/block_html5.txt new file mode 100644 index 0000000..2b24cad --- /dev/null +++ b/tests/misc/block_html5.txt @@ -0,0 +1,14 @@ +<section> + <header> + <hgroup> + <h1>Hello :-)</h1> + </hgroup> + </header> + <figure> + <img src="image.png" alt="" /> + <figcaption>Caption</figcaption> + </figure> + <footer> + <p>Some footer</p> + </footer> +</section><figure></figure> |