@@ -695,7 +695,7 @@ read_citation = matchingElement NsText "bibliography-mark"
695695 ( findAttrWithDefault NsText "identifier" "" )
696696 ( readAttrWithDefault NsText "number" 0 )
697697 )
698− ( matchChildContent [] read_plain_text )
698+ ( matchChildContent [] read_plain_text )
699699 where
700700 makeCitation :: String -> Int -> [Citation]
701701 makeCitation citeId num = [Citation citeId [] [] NormalCitation num 0]
@@ -708,10 +708,17 @@ read_citation = matchingElement NsText "bibliography-mark"
708708--
709709read_table :: BlockMatcher
710710read_table = matchingElement NsTable "table"
711− $ liftA (simpleTable [])
711+ $ liftA simpleTable'
712712 $ matchChildContent' [ read_table_row
713713 ]
714714
715+-- | A simple table without a caption or headers
716+-- | Infers the number of headers from rows
717+simpleTable' :: [[Blocks]] -> Blocks
718+simpleTable' [] = simpleTable [] []
719+simpleTable' (x : rest) = simpleTable (fmap (const defaults) x) (x : rest)
720+ where defaults = fromList []
721+
715722--
716723read_table_row :: ElementMatcher [[Blocks]]
717724read_table_row = matchingElement NsTable "table-row"