aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-07-22 22:09:15 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-07-22 22:09:15 -0700
commitd2cc56a46a5a3c657429e8df5b93c82f3f9ed9fb (patch)
tree7ebcea15a84f048197dbfb29867dc6b8346c91d5 /tests
parented4039c3d7a77b4dbdb67e0463629a9ea563edd5 (diff)
downloadpandoc-d2cc56a46a5a3c657429e8df5b93c82f3f9ed9fb.tar.gz
Revised code for pipe tables.
* All tables now require at least one body row. * Renamed from 'extra' to 'pipe' tables. * Moved functions from Parsing to Readers.Markdown. * Cleaned up code; revised to parse in one pass rather than parsing a raw string, splitting it, and parsing the components. * Allow pipe tables without pipes on the ends (as PHP Markdown Extra does).
Diffstat (limited to 'tests')
-rw-r--r--tests/pipe-tables.native (renamed from tests/extra-tables.native)12
-rw-r--r--tests/pipe-tables.txt (renamed from tests/extra-tables.markdown)8
2 files changed, 19 insertions, 1 deletions
diff --git a/tests/extra-tables.native b/tests/pipe-tables.native
index f9580a8cb..2826c7236 100644
--- a/tests/extra-tables.native
+++ b/tests/pipe-tables.native
@@ -57,4 +57,14 @@
,[Plain [Str "123"]]]
,[[Plain [Str "1"]]
,[Plain [Str "1"]]
- ,[Plain [Str "1"]]]]]
+ ,[Plain [Str "1"]]]]
+,Para [Str "Table",Space,Str "without",Space,Str "sides",Str ":"]
+,Table [] [AlignDefault,AlignRight] [0.0,0.0]
+ [[Plain [Str "Fruit"]]
+ ,[Plain [Str "Quantity"]]]
+ [[[Plain [Str "apple"]]
+ ,[Plain [Str "5"]]]
+ ,[[Plain [Str "orange"]]
+ ,[Plain [Str "17"]]]
+ ,[[Plain [Str "pear"]]
+ ,[Plain [Str "302"]]]]]
diff --git a/tests/extra-tables.markdown b/tests/pipe-tables.txt
index 69a18113b..929038ebb 100644
--- a/tests/extra-tables.markdown
+++ b/tests/pipe-tables.txt
@@ -32,3 +32,11 @@ Headerless table without caption:
|123|123|123|
|1|1|1|
+Table without sides:
+
+Fruit |Quantity
+------|-------:
+apple | 5
+orange| 17
+pear | 302
+