aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordespresc <christian.j.j.despres@gmail.com>2020-04-09 20:08:49 -0400
committerdespresc <christian.j.j.despres@gmail.com>2020-04-15 23:03:22 -0400
commitc7814f31e155da212bd3323294db08fe1f4d8ab9 (patch)
tree9b933ba5d6071bf7e8ca6a17af71cc2780174e7f /test
parentd368536a4ebfc542a58bd9bec6718590711c6efb (diff)
downloadpandoc-c7814f31e155da212bd3323294db08fe1f4d8ab9.tar.gz
Use the new builders, modify readers to preserve empty headers
The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/DokuWiki.hs23
-rw-r--r--test/Tests/Readers/LaTeX.hs10
-rw-r--r--test/Tests/Readers/Man.hs22
-rw-r--r--test/Tests/Readers/Muse.hs120
-rw-r--r--test/Tests/Readers/Org/Block/Table.hs56
-rw-r--r--test/Tests/Readers/Txt2Tags.hs45
-rw-r--r--test/Tests/Writers/ConTeXt.hs7
-rw-r--r--test/Tests/Writers/Muse.hs24
-rw-r--r--test/command/1881.md10
-rw-r--r--test/command/3348.md6
-rw-r--r--test/command/3533-rst-csv-tables.md6
-rw-r--r--test/command/3708.md6
-rw-r--r--test/command/4056.md8
-rw-r--r--test/command/5079.md4
-rw-r--r--test/command/5711.md4
-rw-r--r--test/command/6137.md8
-rw-r--r--test/docbook-reader.native20
-rw-r--r--test/docx/0_level_headers.native4
-rw-r--r--test/docx/sdt_elements.native8
-rw-r--r--test/docx/table_one_row.native8
-rw-r--r--test/docx/tables.native12
-rw-r--r--test/html-reader.native32
-rw-r--r--test/jats-reader.native32
-rw-r--r--test/latex-reader.native4
-rw-r--r--test/man-reader.native16
-rw-r--r--test/tables.fb22
-rw-r--r--test/tables.native20
-rw-r--r--test/tables.tei12
-rw-r--r--test/textile-reader.native16
-rw-r--r--test/txt2tags.native162
30 files changed, 205 insertions, 502 deletions
diff --git a/test/Tests/Readers/DokuWiki.hs b/test/Tests/Readers/DokuWiki.hs
index d812c215f..15a6a6982 100644
--- a/test/Tests/Readers/DokuWiki.hs
+++ b/test/Tests/Readers/DokuWiki.hs
@@ -296,31 +296,22 @@ tests = [ testGroup "inlines"
T.unlines [ "| foo | bar |"
, "| bat | baz |"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[plain "foo", plain "bar"]
- ,[plain "bat", plain "baz"]]
+ simpleTable [] [[plain "foo", plain "bar"]
+ ,[plain "bat", plain "baz"]]
, "Table with header" =:
T.unlines [ "^ foo ^ bar ^"
, "| bat | baz |"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- [plain "foo", plain "bar"]
- [[plain "bat", plain "baz"]]
+ simpleTable [plain "foo", plain "bar"] [[plain "bat", plain "baz"]]
, "Table with colspan" =:
T.unlines [ "^ 0,0 ^ 0,1 ^ 0,2 ^"
, "| 1,0 | 1,1 ||"
, "| 2,0 | 2,1 | 2,2 |"
] =?>
- table
- mempty
- [(AlignDefault, ColWidthDefault)
- ,(AlignDefault, ColWidthDefault)
- ,(AlignDefault, ColWidthDefault)]
- [plain "0,0", plain "0,1", plain "0,2"]
- [[plain "1,0", plain "1,1", mempty]
- ,[plain "2,0", plain "2,1", plain "2,2"]
- ]
+ simpleTable [plain "0,0", plain "0,1", plain "0,2"]
+ [[plain "1,0", plain "1,1", mempty]
+ ,[plain "2,0", plain "2,1", plain "2,2"]
+ ]
, "Indented code block" =:
T.unlines [ "foo"
, " bar"
diff --git a/test/Tests/Readers/LaTeX.hs b/test/Tests/Readers/LaTeX.hs
index 5cddab871..821747f26 100644
--- a/test/Tests/Readers/LaTeX.hs
+++ b/test/Tests/Readers/LaTeX.hs
@@ -36,8 +36,14 @@ infix 4 =:
(=:) = test latex
simpleTable' :: [Alignment] -> [[Blocks]] -> Blocks
-simpleTable' aligns = table "" (zip aligns (repeat ColWidthDefault))
- (map (const mempty) aligns)
+simpleTable' aligns rows
+ = table emptyCaption
+ (zip aligns (repeat ColWidthDefault))
+ (TableHead nullAttr [])
+ [TableBody nullAttr 0 [] $ map toRow rows]
+ (TableFoot nullAttr [])
+ where
+ toRow = Row nullAttr . map simpleCell
tokUntokRt :: String -> Bool
tokUntokRt s = untokenize (tokenize "random" t) == t
diff --git a/test/Tests/Readers/Man.hs b/test/Tests/Readers/Man.hs
index 7623dcb71..7280f15f2 100644
--- a/test/Tests/Readers/Man.hs
+++ b/test/Tests/Readers/Man.hs
@@ -30,6 +30,9 @@ infix 4 =:
=> String -> (Text, c) -> TestTree
(=:) = test man
+toRow :: [Blocks] -> Row
+toRow = Row nullAttr . map simpleCell
+
tests :: [TestTree]
tests = [
-- .SH "HEllo bbb" "aaa"" as"
@@ -122,16 +125,21 @@ tests = [
testGroup "Tables" [
"t1" =:
".TS\nallbox;\nl l l.\na\tb\tc\nd\te\tf\n.TE"
- =?> table mempty (replicate 3 (AlignLeft, ColWidthDefault)) [] [
- map (plain . str ) ["a", "b", "c"],
- map (plain . str ) ["d", "e", "f"]
- ],
+ =?> table
+ emptyCaption
+ (replicate 3 (AlignLeft, ColWidthDefault))
+ (TableHead nullAttr [])
+ [TableBody nullAttr 0 [] $ map toRow
+ [map (plain . str ) ["a", "b", "c"],
+ map (plain . str ) ["d", "e", "f"]]]
+ (TableFoot nullAttr []),
"longcell" =:
".TS\n;\nr.\nT{\na\nb\nc d\nT}\nf\n.TE"
=?> table
- mempty
+ emptyCaption
[(AlignRight, ColWidthDefault)]
- []
- [[plain $ text "a b c d"], [plain $ str "f"]]
+ (TableHead nullAttr [])
+ [TableBody nullAttr 0 [] $ map toRow [[plain $ text "a b c d"], [plain $ str "f"]]]
+ (TableFoot nullAttr [])
]
]
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 074b2dc27..77108eb83 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -43,6 +43,17 @@ infix 4 =:
spcSep :: [Inlines] -> Inlines
spcSep = mconcat . intersperse space
+simpleTable' :: Int -> Caption -> [Blocks] -> [[Blocks]] -> Blocks
+simpleTable' n capt headers rows
+ = table capt
+ (replicate n (AlignDefault, ColWidthDefault))
+ (TableHead nullAttr $ toHeaderRow headers)
+ [TableBody nullAttr 0 [] $ map toRow rows]
+ (TableFoot nullAttr [])
+ where
+ toRow = Row nullAttr . map simpleCell
+ toHeaderRow l = if null l then [] else [toRow l]
+
-- Tables don't round-trip yet
--
makeRoundTrip :: Block -> Block
@@ -982,14 +993,10 @@ tests =
, testGroup "Tables"
[ "Two cell table" =:
"One | Two" =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[plain "One", plain "Two"]]
+ simpleTable [] [[plain "One", plain "Two"]]
, "Table with multiple words" =:
"One two | three four" =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[plain "One two", plain "three four"]]
+ simpleTable [] [[plain "One two", plain "three four"]]
, "Not a table" =:
"One| Two" =?>
para (text "One| Two")
@@ -1001,38 +1008,30 @@ tests =
[ "One | Two"
, "Three | Four"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[plain "One", plain "Two"],
- [plain "Three", plain "Four"]]
+ simpleTable [] [[plain "One", plain "Two"],
+ [plain "Three", plain "Four"]]
, "Table with one header" =:
T.unlines
[ "First || Second"
, "Third | Fourth"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- [plain "First", plain "Second"]
- [[plain "Third", plain "Fourth"]]
+ simpleTable [plain "First", plain "Second"] [[plain "Third", plain "Fourth"]]
, "Table with two headers" =:
T.unlines
[ "First || header"
, "Second || header"
, "Foo | bar"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- [plain "First", plain "header"]
- [[plain "Second", plain "header"],
- [plain "Foo", plain "bar"]]
+ simpleTable [plain "First", plain "header"] [[plain "Second", plain "header"],
+ [plain "Foo", plain "bar"]]
, "Header and footer reordering" =:
T.unlines
[ "Foo ||| bar"
, "Baz || foo"
, "Bar | baz"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- [plain "Baz", plain "foo"]
- [[plain "Bar", plain "baz"],
- [plain "Foo", plain "bar"]]
+ simpleTable [plain "Baz", plain "foo"] [[plain "Bar", plain "baz"],
+ [plain "Foo", plain "bar"]]
, "Table with caption" =:
T.unlines
[ "Foo || bar || baz"
@@ -1040,32 +1039,30 @@ tests =
, "Second | row | there"
, "|+ Table caption +|"
] =?>
- table (text "Table caption") (replicate 3 (AlignDefault, ColWidthDefault))
- [plain "Foo", plain "bar", plain "baz"]
- [[plain "First", plain "row", plain "here"],
- [plain "Second", plain "row", plain "there"]]
+ simpleTable' 3 (simpleCaption $ plain $ text "Table caption")
+ [plain "Foo", plain "bar", plain "baz"]
+ [[plain "First", plain "row", plain "here"],
+ [plain "Second", plain "row", plain "there"]]
, "Table caption with +" =:
T.unlines
[ "Foo | bar"
, "|+ Table + caption +|"
] =?>
- table (text "Table + caption") (replicate 2 (AlignDefault, ColWidthDefault))
- []
- [[plain "Foo", plain "bar"]]
+ simpleTable' 2 (simpleCaption $ plain $ text "Table + caption")
+ []
+ [[plain "Foo", plain "bar"]]
, "Caption without table" =:
"|+ Foo bar baz +|" =?>
- table (text "Foo bar baz") [] [] []
+ simpleTable' 0 (simpleCaption $ plain $ text "Foo bar baz") [] []
, "Table indented with space" =:
T.unlines
[ " Foo | bar"
, " Baz | foo"
, " Bar | baz"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[plain "Foo", plain "bar"],
- [plain "Baz", plain "foo"],
- [plain "Bar", plain "baz"]]
+ simpleTable [] [[plain "Foo", plain "bar"],
+ [plain "Baz", plain "foo"],
+ [plain "Bar", plain "baz"]]
, "Empty cells" =:
T.unlines
[ " | Foo"
@@ -1073,42 +1070,33 @@ tests =
, " bar |"
, " || baz"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- [plain "", plain "baz"]
- [[plain "", plain "Foo"],
- [plain "", plain ""],
- [plain "bar", plain ""]]
+ simpleTable [plain "", plain "baz"] [[plain "", plain "Foo"],
+ [plain "", plain ""],
+ [plain "bar", plain ""]]
, "Empty cell in the middle" =:
T.unlines
[ " 1 | 2 | 3"
, " 4 | | 6"
, " 7 | 8 | 9"
] =?>
- table mempty [ (AlignDefault, ColWidthDefault)
- , (AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[plain "1", plain "2", plain "3"],
- [plain "4", mempty, plain "6"],
- [plain "7", plain "8", plain "9"]]
+ simpleTable []
+ [[plain "1", plain "2", plain "3"],
+ [plain "4", mempty, plain "6"],
+ [plain "7", plain "8", plain "9"]]
, "Grid table" =:
T.unlines
[ "+-----+-----+"
, "| foo | bar |"
, "+-----+-----+"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[para "foo", para "bar"]]
+ simpleTable [] [[para "foo", para "bar"]]
, "Grid table inside list" =:
T.unlines
[ " - +-----+-----+"
, " | foo | bar |"
, " +-----+-----+"
] =?>
- bulletList [table mempty [ (AlignDefault, ColWidthDefault)
- , (AlignDefault, ColWidthDefault)]
- []
- [[para "foo", para "bar"]]]
+ bulletList [simpleTable [] [[para "foo", para "bar"]]]
, "Grid table with two rows" =:
T.unlines
[ "+-----+-----+"
@@ -1117,10 +1105,8 @@ tests =
, "| bat | baz |"
, "+-----+-----+"
] =?>
- table mempty [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [[para "foo", para "bar"]
- ,[para "bat", para "baz"]]
+ simpleTable [] [[para "foo", para "bar"]
+ ,[para "bat", para "baz"]]
, "Grid table inside grid table" =:
T.unlines
[ "+-----+"
@@ -1129,11 +1115,7 @@ tests =
, "|+---+|"
, "+-----+"
] =?>
- table mempty [(AlignDefault, ColWidthDefault)]
- []
- [[table mempty [(AlignDefault, ColWidthDefault)]
- []
- [[para "foo"]]]]
+ simpleTable [] [[simpleTable [] [[para "foo"]]]]
, "Grid table with example" =:
T.unlines
[ "+------------+"
@@ -1142,9 +1124,7 @@ tests =
, "| </example> |"
, "+------------+"
] =?>
- table mempty [(AlignDefault, ColWidthDefault)]
- []
- [[codeBlock "foo"]]
+ simpleTable [] [[codeBlock "foo"]]
]
, testGroup "Lists"
[ "Bullet list" =:
@@ -1513,19 +1493,11 @@ tests =
]
, "Definition list with table" =:
" foo :: bar | baz" =?>
- definitionList [ ("foo", [ table mempty [ (AlignDefault, ColWidthDefault)
- , (AlignDefault, ColWidthDefault)]
- []
- [[plain "bar", plain "baz"]]
+ definitionList [ ("foo", [ simpleTable [] [[plain "bar", plain "baz"]]
])]
, "Definition list with table inside bullet list" =:
" - foo :: bar | baz" =?>
- bulletList [definitionList [ ("foo", [ table
- mempty
- [ (AlignDefault, ColWidthDefault)
- , (AlignDefault, ColWidthDefault) ]
- []
- [[plain "bar", plain "baz"]]
+ bulletList [definitionList [ ("foo", [ simpleTable [] [[plain "bar", plain "baz"]]
])]]
, test emacsMuse "Multi-line definition lists from Emacs Muse manual"
(T.unlines
diff --git a/test/Tests/Readers/Org/Block/Table.hs b/test/Tests/Readers/Org/Block/Table.hs
index 4b76f4a58..d35d17979 100644
--- a/test/Tests/Readers/Org/Block/Table.hs
+++ b/test/Tests/Readers/Org/Block/Table.hs
@@ -24,7 +24,18 @@ simpleTable' :: Int
-> [Blocks]
-> [[Blocks]]
-> Blocks
-simpleTable' n = table "" (replicate n (AlignDefault, ColWidthDefault))
+simpleTable' n = simpleTable'' emptyCaption $ replicate n (AlignDefault, ColWidthDefault)
+
+simpleTable'' :: Caption -> [ColSpec] -> [Blocks] -> [[Blocks]] -> Blocks
+simpleTable'' capt spec headers rows
+ = table capt
+ spec
+ (TableHead nullAttr $ toHeaderRow headers)
+ [TableBody nullAttr 0 [] $ map toRow rows]
+ (TableFoot nullAttr [])
+ where
+ toRow = Row nullAttr . map simpleCell
+ toHeaderRow l = if null l then [] else [toRow l]
tests :: [TestTree]
tests =
@@ -121,14 +132,16 @@ tests =
, "| 1 | One | foo |"
, "| 2 | Two | bar |"
] =?>
- table "" (zip
- [AlignCenter, AlignRight, AlignDefault]
- [ColWidthDefault, ColWidthDefault, ColWidthDefault])
- []
- [ [ plain "Numbers", plain "Text", plain "More" ]
- , [ plain "1" , plain "One" , plain "foo" ]
- , [ plain "2" , plain "Two" , plain "bar" ]
- ]
+ simpleTable''
+ emptyCaption
+ (zip
+ [AlignCenter, AlignRight, AlignDefault]
+ [ColWidthDefault, ColWidthDefault, ColWidthDefault])
+ []
+ [ [ plain "Numbers", plain "Text", plain "More" ]
+ , [ plain "1" , plain "One" , plain "foo" ]
+ , [ plain "2" , plain "Two" , plain "bar" ]
+ ]
, "Pipe within text doesn't start a table" =:
"Ceci n'est pas une | pipe " =?>
@@ -145,23 +158,26 @@ tests =
, "| 1 | One | foo |"
, "| 2"
] =?>
- table "" (zip [AlignCenter, AlignRight] [ColWidthDefault, ColWidthDefault])
- [ plain "Numbers", plain "Text" ]
- [ [ plain "1" , plain "One" , plain "foo" ]
- , [ plain "2" ]
- ]
+ simpleTable''
+ emptyCaption
+ (zip [AlignCenter, AlignRight] [ColWidthDefault, ColWidthDefault])
+ [ plain "Numbers", plain "Text" ]
+ [ [ plain "1" , plain "One" , plain "foo" ]
+ , [ plain "2" ]
+ ]
, "Table with caption" =:
T.unlines [ "#+CAPTION: Hitchhiker's Multiplication Table"
, "| x | 6 |"
, "| 9 | 42 |"
] =?>
- table "Hitchhiker's Multiplication Table"
- [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
- []
- [ [ plain "x", plain "6" ]
- , [ plain "9", plain "42" ]
- ]
+ simpleTable''
+ (simpleCaption $ plain "Hitchhiker's Multiplication Table")
+ [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)]
+ []
+ [ [ plain "x", plain "6" ]
+ , [ plain "9", plain "42" ]
+ ]
, "named table" =:
T.unlines [ "#+NAME: x-marks-the-spot"
diff --git a/test/Tests/Readers/Txt2Tags.hs b/test/Tests/Readers/Txt2Tags.hs
index be6747bfe..a56f814ae 100644
--- a/test/Tests/Readers/Txt2Tags.hs
+++ b/test/Tests/Readers/Txt2Tags.hs
@@ -44,7 +44,18 @@ simpleTable' :: Int
-> [Blocks]
-> [[Blocks]]
-> Blocks
-simpleTable' n = table "" (replicate n (AlignCenter, ColWidthDefault))
+simpleTable' n = simpleTable'' $ replicate n (AlignCenter, ColWidthDefault)
+
+simpleTable'' :: [ColSpec] -> [Blocks] -> [[Blocks]] -> Blocks
+simpleTable'' spec headers rows
+ = table emptyCaption
+ spec
+ (TableHead nullAttr $ toHeaderRow headers)
+ [TableBody nullAttr 0 [] $ map toRow rows]
+ (TableFoot nullAttr [])
+ where
+ toRow = Row nullAttr . map simpleCell
+ toHeaderRow l = if null l then [] else [toRow l]
tests :: [TestTree]
tests =
@@ -398,14 +409,15 @@ tests =
, "| 1 | One | foo |"
, "| 2 | Two | bar |"
] =?>
- table "" (zip
- [AlignCenter, AlignRight, AlignDefault]
- [ColWidthDefault, ColWidthDefault, ColWidthDefault])
- []
- [ [ plain "Numbers", plain "Text", plain "More" ]
- , [ plain "1" , plain "One" , plain "foo" ]
- , [ plain "2" , plain "Two" , plain "bar" ]
- ]
+ simpleTable''
+ (zip
+ [AlignCenter, AlignRight, AlignDefault]
+ [ColWidthDefault, ColWidthDefault, ColWidthDefault])
+ []
+ [ [ plain "Numbers", plain "Text", plain "More" ]
+ , [ plain "1" , plain "One" , plain "foo" ]
+ , [ plain "2" , plain "Two" , plain "bar" ]
+ ]
, "Pipe within text doesn't start a table" =:
"Ceci n'est pas une | pipe " =?>
@@ -417,13 +429,14 @@ tests =
, "| 1 | One | foo |"
, "| 2 "
] =?>
- table "" (zip
- [AlignCenter, AlignLeft, AlignLeft]
- [ColWidthDefault, ColWidthDefault, ColWidthDefault])
- [ plain "Numbers", plain "Text" , plain mempty ]
- [ [ plain "1" , plain "One" , plain "foo" ]
- , [ plain "2" , plain mempty , plain mempty ]
- ]
+ simpleTable''
+ (zip
+ [AlignCenter, AlignLeft, AlignLeft]
+ [ColWidthDefault, ColWidthDefault, ColWidthDefault])
+ [ plain "Numbers", plain "Text" , plain mempty ]
+ [ [ plain "1" , plain "One" , plain "foo" ]
+ , [ plain "2" , plain mempty , plain mempty ]
+ ]
]
diff --git a/test/Tests/Writers/ConTeXt.hs b/test/Tests/Writers/ConTeXt.hs
index cc90b95a9..c747e5d2f 100644
--- a/test/Tests/Writers/ConTeXt.hs
+++ b/test/Tests/Writers/ConTeXt.hs
@@ -116,7 +116,12 @@ tests = [ testGroup "inline code"
plain $ text "3.2",
plain $ text "3.3",
plain $ text "3.4"]]
- in table capt aligns headers rows
+ toRow = Row nullAttr . map simpleCell
+ in table (simpleCaption $ plain capt)
+ aligns
+ (TableHead nullAttr [toRow headers])
+ [TableBody nullAttr 0 [] $ map toRow rows]
+ (TableFoot nullAttr [])
=?> unlines [ "\\startplacetable[title={Table 1}]"
, "\\startTABLE"
, "\\startTABLEhead"
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index 42748ad85..d0df0799f 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -372,8 +372,12 @@ tests = [ testGroup "block elements"
[ "table without header" =:
let rows = [[para "Para 1.1", para "Para 1.2"]
,[para "Para 2.1", para "Para 2.2"]]
- in table mempty [(AlignDefault,ColWidthDefault),(AlignDefault,ColWidthDefault)]
- [mempty, mempty] rows
+ toRow = Row nullAttr . map simpleCell
+ in table emptyCaption
+ [(AlignDefault,ColWidthDefault),(AlignDefault,ColWidthDefault)]
+ (TableHead nullAttr [toRow [mempty, mempty]])
+ [TableBody nullAttr 0 [] $ map toRow rows]
+ (TableFoot nullAttr [])
=?>
unlines [ " Para 1.1 | Para 1.2"
, " Para 2.1 | Para 2.2"
@@ -389,12 +393,16 @@ tests = [ testGroup "block elements"
, " Para 2.1 | Para 2.2"
]
, "table with header and caption" =:
- let capt = "Table 1"
- headers = [plain "header 1", plain "header 2"]
- rows = [[para "Para 1.1", para "Para 1.2"]
- ,[para "Para 2.1", para "Para 2.2"]]
- in table capt [(AlignDefault,ColWidthDefault),(AlignDefault,ColWidthDefault)]
- headers rows
+ let capt = simpleCaption $ plain "Table 1"
+ toRow = Row nullAttr . map simpleCell
+ headers = [toRow [plain "header 1", plain "header 2"]]
+ rows = map toRow [[para "Para 1.1", para "Para 1.2"]
+ ,[para "Para 2.1", para "Para 2.2"]]
+ in table capt
+ [(AlignDefault,ColWidthDefault),(AlignDefault,ColWidthDefault)]
+ (TableHead nullAttr headers)
+ [TableBody nullAttr 0 [] rows]
+ (TableFoot nullAttr [])
=?> unlines [ " header 1 || header 2"
, " Para 1.1 | Para 1.2"
, " Para 2.1 | Para 2.2"
diff --git a/test/command/1881.md b/test/command/1881.md
index 4a4b6b763..6b61fd667 100644
--- a/test/command/1881.md
+++ b/test/command/1881.md
@@ -69,15 +69,7 @@
,(AlignCenter,ColWidthDefault)
,(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/command/3348.md b/test/command/3348.md
index 04c48c35d..86b1514d1 100644
--- a/test/command/3348.md
+++ b/test/command/3348.md
@@ -12,11 +12,7 @@
[(AlignRight,ColWidth 8.333333333333333e-2)
,(AlignLeft,ColWidth 0.6805555555555556)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/command/3533-rst-csv-tables.md b/test/command/3533-rst-csv-tables.md
index 9c077ee56..70339d95d 100644
--- a/test/command/3533-rst-csv-tables.md
+++ b/test/command/3533-rst-csv-tables.md
@@ -94,11 +94,7 @@
[(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/command/3708.md b/test/command/3708.md
index 2b277fe30..b4fc0da1b 100644
--- a/test/command/3708.md
+++ b/test/command/3708.md
@@ -10,11 +10,7 @@
[(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/command/4056.md b/test/command/4056.md
index 047143318..2f5111aeb 100644
--- a/test/command/4056.md
+++ b/test/command/4056.md
@@ -20,13 +20,7 @@ Blah & Foo & Bar \\
,(AlignRight,ColWidthDefault)
,(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/command/5079.md b/test/command/5079.md
index b7d5107b6..a43c9840a 100644
--- a/test/command/5079.md
+++ b/test/command/5079.md
@@ -14,9 +14,7 @@
[])
[(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/command/5711.md b/test/command/5711.md
index b0d274860..5758138f9 100644
--- a/test/command/5711.md
+++ b/test/command/5711.md
@@ -11,9 +11,7 @@
[])
[(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/command/6137.md b/test/command/6137.md
index 17c3406c2..9081f775f 100644
--- a/test/command/6137.md
+++ b/test/command/6137.md
@@ -23,13 +23,7 @@ This reference to Figure \ref{fig:label} works fine.
,(AlignCenter,ColWidthDefault)
,(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docbook-reader.native b/test/docbook-reader.native
index d52e471ed..c86a055bd 100644
--- a/test/docbook-reader.native
+++ b/test/docbook-reader.native
@@ -511,15 +511,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Sof
,(AlignCenter,ColWidthDefault)
,(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -559,15 +551,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Sof
,(AlignRight,ColWidth 0.25)
,(AlignLeft,ColWidth 0.25)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docx/0_level_headers.native b/test/docx/0_level_headers.native
index 773d9acdf..7f875891e 100644
--- a/test/docx/0_level_headers.native
+++ b/test/docx/0_level_headers.native
@@ -2,9 +2,7 @@
[])
[(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docx/sdt_elements.native b/test/docx/sdt_elements.native
index 7c2248d39..dca82f0a0 100644
--- a/test/docx/sdt_elements.native
+++ b/test/docx/sdt_elements.native
@@ -4,13 +4,7 @@
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docx/table_one_row.native b/test/docx/table_one_row.native
index 484efc5f5..e9188b145 100644
--- a/test/docx/table_one_row.native
+++ b/test/docx/table_one_row.native
@@ -4,13 +4,7 @@
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/docx/tables.native b/test/docx/tables.native
index 89efc7309..e541e5a6e 100644
--- a/test/docx/tables.native
+++ b/test/docx/tables.native
@@ -51,11 +51,7 @@
[(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -75,11 +71,7 @@
[(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/html-reader.native b/test/html-reader.native
index c73312205..1d7d20b13 100644
--- a/test/html-reader.native
+++ b/test/html-reader.native
@@ -625,13 +625,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -657,13 +651,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -689,13 +677,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -721,13 +703,7 @@ Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("titl
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/jats-reader.native b/test/jats-reader.native
index 566e02307..ab77dd1a0 100644
--- a/test/jats-reader.native
+++ b/test/jats-reader.native
@@ -573,13 +573,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
,(AlignLeft,ColWidthDefault)
,(AlignLeft,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -604,13 +598,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
,(AlignLeft,ColWidthDefault)
,(AlignLeft,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -635,13 +623,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
,(AlignLeft,ColWidthDefault)
,(AlignLeft,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -666,13 +648,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
,(AlignLeft,ColWidthDefault)
,(AlignLeft,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/latex-reader.native b/test/latex-reader.native
index 43262fff3..d272b7d6d 100644
--- a/test/latex-reader.native
+++ b/test/latex-reader.native
@@ -304,9 +304,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
[])
[(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/man-reader.native b/test/man-reader.native
index 1aed243ad..2ab088ff1 100644
--- a/test/man-reader.native
+++ b/test/man-reader.native
@@ -245,15 +245,7 @@ Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "Oct",Space,Str "17,",
,(AlignCenter,ColWidthDefault)
,(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -290,11 +282,7 @@ Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "Oct",Space,Str "17,",
[(AlignRight,ColWidth 0.5)
,(AlignLeft,ColWidth 0.5)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/tables.fb2 b/test/tables.fb2
index a36378ccc..9445ace93 100644
--- a/test/tables.fb2
+++ b/test/tables.fb2
@@ -10,6 +10,6 @@ Header</th><th align="left">Left
Aligned</th><th align="right">Right
Aligned</th><th align="left">Default aligned</th></tr><tr><td align="center">First</td><td align="left">row</td><td align="right">12.0</td><td align="left">Example of a row that spans
multiple lines.</td></tr><tr><td align="center">Second</td><td align="left">row</td><td align="right">5.0</td><td align="left">Here’s another one. Note
-the blank line between rows.</td></tr></table><p><emphasis /></p><p>Table without column headers:</p><table><tr><th align="right" /><th align="left" /><th align="center" /><th align="right" /></tr><tr><td align="right">12</td><td align="left">12</td><td align="center">12</td><td align="right">12</td></tr><tr><td align="right">123</td><td align="left">123</td><td align="center">123</td><td align="right">123</td></tr><tr><td align="right">1</td><td align="left">1</td><td align="center">1</td><td align="right">1</td></tr></table><p><emphasis /></p><p>Multiline table without column headers:</p><table><tr><th align="center" /><th align="left" /><th align="right" /><th align="left" /></tr><tr><td align="center">First</td><td align="left">row</td><td align="right">12.0</td><td align="left">Example of a row that spans
+the blank line between rows.</td></tr></table><p><emphasis /></p><p>Table without column headers:</p><table><tr><td align="right">12</td><td align="left">12</td><td align="center">12</td><td align="right">12</td></tr><tr><td align="right">123</td><td align="left">123</td><td align="center">123</td><td align="right">123</td></tr><tr><td align="right">1</td><td align="left">1</td><td align="center">1</td><td align="right">1</td></tr></table><p><emphasis /></p><p>Multiline table without column headers:</p><table><tr><td align="center">First</td><td align="left">row</td><td align="right">12.0</td><td align="left">Example of a row that spans
multiple lines.</td></tr><tr><td align="center">Second</td><td align="left">row</td><td align="right">5.0</td><td align="left">Here’s another one. Note
the blank line between rows.</td></tr></table><p><emphasis /></p></section></body></FictionBook>
diff --git a/test/tables.native b/test/tables.native
index 4af38d174..dc74826e0 100644
--- a/test/tables.native
+++ b/test/tables.native
@@ -228,15 +228,7 @@
,(AlignCenter,ColWidthDefault)
,(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -276,15 +268,7 @@
,(AlignRight,ColWidth 0.1625)
,(AlignDefault,ColWidth 0.35)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/tables.tei b/test/tables.tei
index 64438e520..90fd3cdc6 100644
--- a/test/tables.tei
+++ b/test/tables.tei
@@ -123,12 +123,6 @@
</table>
<p>Table without column headers:</p>
<table>
- <row role="label">
- <cell></cell>
- <cell></cell>
- <cell></cell>
- <cell></cell>
- </row>
<row>
<cell><p>12</p></cell>
<cell><p>12</p></cell>
@@ -150,12 +144,6 @@
</table>
<p>Multiline table without column headers:</p>
<table>
- <row role="label">
- <cell></cell>
- <cell></cell>
- <cell></cell>
- <cell></cell>
- </row>
<row>
<cell><p>First</p></cell>
<cell><p>row</p></cell>
diff --git a/test/textile-reader.native b/test/textile-reader.native
index 9fac452b4..c43ebc82d 100644
--- a/test/textile-reader.native
+++ b/test/textile-reader.native
@@ -109,13 +109,7 @@ Pandoc (Meta {unMeta = fromList []})
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -203,13 +197,7 @@ Pandoc (Meta {unMeta = fromList []})
,(AlignDefault,ColWidthDefault)
,(AlignDefault,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
diff --git a/test/txt2tags.native b/test/txt2tags.native
index 35aef0893..3524fe467 100644
--- a/test/txt2tags.native
+++ b/test/txt2tags.native
@@ -305,9 +305,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
[])
[(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -321,13 +319,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignRight,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -345,13 +337,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -370,13 +356,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -489,15 +469,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -546,17 +518,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -624,17 +586,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -713,17 +665,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -805,23 +747,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -946,71 +872,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
,(AlignCenter,ColWidthDefault)
,(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])
@@ -1084,9 +946,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]
[])
[(AlignCenter,ColWidthDefault)]
(TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
+ [])
[(TableBody ("",[],[]) (RowHeadColumns 0)
[]
[Row ("",[],[])