From be0a34d705eecd6ed13c67558f17626597ba6603 Mon Sep 17 00:00:00 2001 From: Horst Gutmann Date: Sun, 22 May 2011 10:39:51 +0200 Subject: Added new HTML5 block elements to known block level elements --- markdown/util.py | 4 +++- tests/misc/block_html5.html | 16 ++++++++++++++++ tests/misc/block_html5.txt | 14 ++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tests/misc/block_html5.html create mode 100644 tests/misc/block_html5.txt 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 @@ +
+
+
+

Hello :-)

+
+
+
+ +
Caption
+
+
+

Some footer

+
+
+ +
\ 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 @@ +
+
+
+

Hello :-)

+
+
+
+ +
Caption
+
+
+

Some footer

+
+
-- cgit v1.2.3