aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-10-11 09:46:58 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-10-11 09:46:58 -0700
commit7c2dd0359b8ece3df91af81338274008c0740a69 (patch)
tree732109463f023f8d1bfc10f27cccefa9679d6733 /src/Text/Pandoc/Writers
parent34e6464e306d9926f4559156fd144361f0b4efb0 (diff)
downloadpandoc-7c2dd0359b8ece3df91af81338274008c0740a69.tar.gz
Markdown writer: prefer pipe_tables to raw html...
...even when we must lose width information. All in all this seems to be people's preferred behavior, even though it is slightly lossier. Closes #2608. Closes #4497.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index fc25cde44..8f8b7ec14 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -628,15 +628,15 @@ blockToMarkdown' opts t@(Table caption aligns widths headers rows) = do
writerColumns opts >= 8 * numcols -> (id,) <$>
gridTable opts blockListToMarkdown
(all null headers) aligns' widths' headers rows
- | isEnabled Ext_raw_html opts -> fmap (id,) $
- (text . T.unpack) <$>
- (writeHtml5String opts{ writerTemplate = Nothing } $ Pandoc nullMeta [t])
| hasSimpleCells &&
isEnabled Ext_pipe_tables opts -> do
rawHeaders <- padRow <$> mapM (blockListToMarkdown opts) headers
rawRows <- mapM (fmap padRow . mapM (blockListToMarkdown opts))
rows
(id,) <$> pipeTable (all null headers) aligns' rawHeaders rawRows
+ | isEnabled Ext_raw_html opts -> fmap (id,) $
+ (text . T.unpack) <$>
+ (writeHtml5String opts{ writerTemplate = Nothing } $ Pandoc nullMeta [t])
| otherwise -> return $ (id, text "[TABLE]")
return $ nst (tbl $$ caption'') $$ blankline
blockToMarkdown' opts (BulletList items) = do