aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/util.py4
-rw-r--r--tests/misc/block_html5.html16
-rw-r--r--tests/misc/block_html5.txt14
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>