From 047d4d4aa84af470de41bb164c94ec90e7c725bb Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 11 Mar 2009 20:09:34 -0400 Subject: Added table elements to block elements so tables get prettified and updated tables extension test. --- markdown/__init__.py | 3 +- tests/extensions-x-tables/tables.html | 124 ++++++++++++++++++++++++++++++++-- 2 files changed, 120 insertions(+), 7 deletions(-) diff --git a/markdown/__init__.py b/markdown/__init__.py index 4c5f993..31ab29c 100644 --- a/markdown/__init__.py +++ b/markdown/__init__.py @@ -69,7 +69,8 @@ DEFAULT_OUTPUT_FORMAT = 'xhtml1' # xhtml or html4 output HTML_REMOVED_TEXT = "[HTML_REMOVED]" # text used instead of HTML in safe mode 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|tr") + "|ins|del|hr|hr/|style|li|dt|dd|thead|tbody" + "|tr|th|td") DOC_TAG = "div" # Element used to wrap document - later removed # Placeholders diff --git a/tests/extensions-x-tables/tables.html b/tests/extensions-x-tables/tables.html index 0549bdf..c931e6a 100644 --- a/tests/extensions-x-tables/tables.html +++ b/tests/extensions-x-tables/tables.html @@ -1,7 +1,119 @@

Table Tests

-
First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell
-
First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell
-
ItemValue
Computer$1600
Phone$12
Pipe$1
-
Function nameDescription
help()Display the help window.
destroy()Destroy your computer!
-
foobarbaz
Q
WW
-
foobarbaz
Q
WW
\ No newline at end of file + + + + + + + + + + + + + + + + + +
First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell
+ + + + + + + + + + + + + + + + + +
First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell
+ + + + + + + + + + + + + + + + + + + + + +
ItemValue
Computer$1600
Phone$12
Pipe$1
+ + + + + + + + + + + + + + + + + +
Function nameDescription
help()Display the help window.
destroy()Destroy your computer!
+ + + + + + + + + + + + + + + + + +
foobarbaz
+Q +
W +W
+ + + + + + + + + + + + + + + + + +
foobarbaz
+Q +
W +W
\ No newline at end of file -- cgit v1.2.3