aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Jira.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-04-17 10:04:39 -0700
committerGitHub <noreply@github.com>2020-04-17 10:04:39 -0700
commit906305de789c83f9fdcc2c7d30044acf97e89582 (patch)
treef359e991e60e7324f11e73a40259ed9dc3e4b91b /src/Text/Pandoc/Writers/Jira.hs
parentf0f3cc14beeea51f703f7cfc8b40ebf3de2d0a05 (diff)
parentd1521af8fb0d3e8ee4104224e4d5e0b6e6bfad8c (diff)
downloadpandoc-906305de789c83f9fdcc2c7d30044acf97e89582.tar.gz
Merge pull request #6224 from despresc/better-tables
Diffstat (limited to 'src/Text/Pandoc/Writers/Jira.hs')
-rw-r--r--src/Text/Pandoc/Writers/Jira.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Jira.hs b/src/Text/Pandoc/Writers/Jira.hs
index 19db34137..1bf14c6a0 100644
--- a/src/Text/Pandoc/Writers/Jira.hs
+++ b/src/Text/Pandoc/Writers/Jira.hs
@@ -29,7 +29,7 @@ import Text.Pandoc.Options (WriterOptions (writerTemplate, writerWrapText),
import Text.Pandoc.Shared (linesToPara, stringify)
import Text.Pandoc.Templates (renderTemplate)
import Text.Pandoc.Writers.Math (texMathToInlines)
-import Text.Pandoc.Writers.Shared (defField, metaToContext)
+import Text.Pandoc.Writers.Shared (defField, metaToContext, toLegacyTable)
import Text.DocLayout (literal, render)
import qualified Data.Text as T
import qualified Text.Jira.Markup as Jira
@@ -98,7 +98,8 @@ toJiraBlocks blocks = do
Plain xs -> singleton . Jira.Para <$> toJiraInlines xs
RawBlock fmt cs -> rawBlockToJira fmt cs
Null -> return mempty
- Table _ _ _ hd body -> singleton <$> do
+ Table _ blkCapt specs thead tbody tfoot -> singleton <$> do
+ let (_, _, _, hd, body) = toLegacyTable blkCapt specs thead tbody tfoot
headerRow <- if all null hd
then pure Nothing
else Just <$> toRow Jira.HeaderCell hd
@@ -112,7 +113,7 @@ toJiraBlocks blocks = do
toRow :: PandocMonad m
=> ([Jira.Block] -> Jira.Cell)
- -> [TableCell]
+ -> [[Block]]
-> JiraConverter m Jira.Row
toRow mkCell cells = Jira.Row <$>
mapM (fmap mkCell . toJiraBlocks) cells