diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-01 02:28:03 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-01 02:28:03 +0000 |
commit | 66d2fe3dd2d8dfb28771794aee6118fa5506a9f7 (patch) | |
tree | b64fe47dd51ba528196fe6680a87601d853c8f26 /src/Text/Pandoc/Writers/HTML.hs | |
parent | da9eb0760ead057301d870647ed3abff00a9090b (diff) |
HTML, LaTeX writer: Don't print header row in headerless table.
Resolves Issue #210.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1856 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index cca65751f..386fae6be 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -346,8 +346,7 @@ blockToHtml opts (Table capt aligns widths headers rows') = do captionDoc <- if null capt then return noHtml else inlineListToHtml opts capt >>= return . caption - colHeads <- colHeadsToHtml opts alignStrings - widths headers + colHeads <- colHeadsToHtml opts alignStrings widths headers rows'' <- zipWithM (tableRowToHtml opts alignStrings) (cycle ["odd", "even"]) rows' return $ table $ captionDoc +++ colHeads +++ rows'' @@ -356,6 +355,7 @@ colHeadsToHtml :: WriterOptions -> [Double] -> [[Block]] -> State WriterState Html +colHeadsToHtml _ _ _ headers | all null headers = return noHtml colHeadsToHtml opts alignStrings widths headers = do heads <- sequence $ zipWith3 (\alignment columnwidth item -> tableItemToHtml opts th alignment columnwidth item) |