From 60819541858f9da6fcb77e8bd09693635553d3ef Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Fri, 18 Apr 2014 00:19:22 +0300 Subject: [PATCH] resolve #154 --- Parsedown.php | 1 + tests/data/aesthetic_table.html | 18 ++++++++++++++++++ tests/data/aesthetic_table.md | 4 ++++ tests/data/simple_table.html | 19 +++++++++++++++++++ tests/data/simple_table.md | 15 +++++++++++---- 5 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 tests/data/aesthetic_table.html create mode 100644 tests/data/aesthetic_table.md diff --git a/Parsedown.php b/Parsedown.php index e87996b..e7f4f9e 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -86,6 +86,7 @@ class Parsedown '7' => array('List'), '8' => array('List'), '9' => array('List'), + ':' => array('Table'), '<' => array('Markup'), '=' => array('Setext'), '>' => array('Quote'), diff --git a/tests/data/aesthetic_table.html b/tests/data/aesthetic_table.html new file mode 100644 index 0000000..88e1c2b --- /dev/null +++ b/tests/data/aesthetic_table.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/tests/data/aesthetic_table.md b/tests/data/aesthetic_table.md new file mode 100644 index 0000000..5245e6c --- /dev/null +++ b/tests/data/aesthetic_table.md @@ -0,0 +1,4 @@ +| header 1 | header 2 | +| -------- | -------- | +| cell 1.1 | cell 1.2 | +| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/tests/data/simple_table.html b/tests/data/simple_table.html index 88e1c2b..64b7a9a 100644 --- a/tests/data/simple_table.html +++ b/tests/data/simple_table.html @@ -15,4 +15,23 @@ cell 2.2 + +
+ + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/tests/data/simple_table.md b/tests/data/simple_table.md index 5245e6c..466d140 100644 --- a/tests/data/simple_table.md +++ b/tests/data/simple_table.md @@ -1,4 +1,11 @@ -| header 1 | header 2 | -| -------- | -------- | -| cell 1.1 | cell 1.2 | -| cell 2.1 | cell 2.2 | \ No newline at end of file +header 1 | header 2 +-------- | -------- +cell 1.1 | cell 1.2 +cell 2.1 | cell 2.2 + +--- + +header 1 | header 2 +:------- | -------- +cell 1.1 | cell 1.2 +cell 2.1 | cell 2.2 \ No newline at end of file