diff options
Diffstat (limited to 'src/Text/Pandoc/Writers/FB2.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/FB2.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs index 83bcf2038..5e6f1861e 100644 --- a/src/Text/Pandoc/Writers/FB2.hs +++ b/src/Text/Pandoc/Writers/FB2.hs @@ -336,10 +336,10 @@ blockToXml h@Header{} = do blockToXml HorizontalRule = return [ el "empty-line" () ] blockToXml (Table _ blkCapt specs thead tbody tfoot) = do let (caption, aligns, _, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot - hd <- mkrow "th" headers aligns + hd <- if null headers then pure [] else (:[]) <$> mkrow "th" headers aligns bd <- mapM (\r -> mkrow "td" r aligns) rows c <- el "emphasis" <$> cMapM toXml caption - return [el "table" (hd : bd), el "p" c] + return [el "table" (hd <> bd), el "p" c] where mkrow :: PandocMonad m => String -> [[Block]] -> [Alignment] -> FBM m Content mkrow tag cells aligns' = |