aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-02-27 20:39:21 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-02-27 20:39:21 +0000
commit76ab88807e2a6e2161343f8b0a3d01a8a22e9d99 (patch)
treefac3c53d0498f9820bf7012239be61bb3a7719f6 /tests
parentddcde4d543f865fa95d2a6bb4ca2dfdfc4435c13 (diff)
downloadpandoc-76ab88807e2a6e2161343f8b0a3d01a8a22e9d99.tar.gz
RST reader: Improved grid tables.
+ Table cells can now contain multiple block elements, such as lists or paragraphs. + Table parser is now forgiving of spaces at ends of lines. + Added test cases. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1852 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'tests')
-rw-r--r--tests/rst-reader.native23
-rw-r--r--tests/rst-reader.rst17
2 files changed, 39 insertions, 1 deletions
diff --git a/tests/rst-reader.native b/tests/rst-reader.native
index f3c1e5bd2..8b7ce24c4 100644
--- a/tests/rst-reader.native
+++ b/tests/rst-reader.native
@@ -287,5 +287,26 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str
, [ Plain [Str "c",Space,Str "c",Space,Str "2"] ] ],
[ [ Plain [Str "r2",Space,Str "d"] ]
, [ Plain [Str "e"] ]
- , [ Plain [Str "f"] ] ] ] ]
+ , [ Plain [Str "f"] ] ] ]
+, Para [Str "Spaces",Space,Str "at",Space,Str "ends",Space,Str "of",Space,Str "lines"]
+, Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2375,0.15,0.1625]
+ [ []
+ , []
+ , [] ] [
+ [ [ Plain [Str "r1",Space,Str "a",Space,Str "r1",Space,Str "bis"] ]
+ , [ Plain [Str "b",Space,Str "b",Space,Str "2"] ]
+ , [ Plain [Str "c",Space,Str "c",Space,Str "2"] ] ],
+ [ [ Plain [Str "r2",Space,Str "d"] ]
+ , [ Plain [Str "e"] ]
+ , [ Plain [Str "f"] ] ] ]
+, Para [Str "Multiple",Space,Str "blocks",Space,Str "in",Space,Str "a",Space,Str "cell"]
+, Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2375,0.15,0.1625]
+ [ []
+ , []
+ , [] ] [
+ [ [ Para [Str "r1",Space,Str "a"]
+ , Para [Str "r1",Space,Str "bis"] ], [ BulletList
+ [ [ Plain [Str "b"] ]
+ , [ Plain [Str "b",Space,Str "2"] ]
+ , [ Plain [Str "b",Space,Str "2"] ] ] ], [ Plain [Str "c",Space,Str "c",Space,Str "2",Space,Str "c",Space,Str "2"] ] ] ] ]
diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst
index ccc248aee..8c4b7d726 100644
--- a/tests/rst-reader.rst
+++ b/tests/rst-reader.rst
@@ -491,3 +491,20 @@ Headless
+------------------+-----------+------------+
| r2 d | e | f |
+------------------+-----------+------------+
+
+Spaces at ends of lines
+
++------------------+-----------+------------+
+| r1 a | b | c |
+| r1 bis | b 2 | c 2 |
++------------------+-----------+------------+
+| r2 d | e | f |
++------------------+-----------+------------+
+
+Multiple blocks in a cell
+
++------------------+-----------+------------+
+| r1 a | - b | c |
+| | - b 2 | c 2 |
+| r1 bis | - b 2 | c 2 |
++------------------+-----------+------------+