aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org
diff options
context:
space:
mode:
authordespresc <christian.j.j.despres@gmail.com>2020-04-04 16:35:42 -0400
committerdespresc <christian.j.j.despres@gmail.com>2020-04-15 23:03:22 -0400
commit4e34d366df31937cdc69b6b366355f10a84c16b2 (patch)
tree844503b0f59439acaec5d2f8e2f016e2eb1d214c /src/Text/Pandoc/Readers/Org
parentf8ce38975b547fe7fc8c12ccee3a940b35d8b9cf (diff)
downloadpandoc-4e34d366df31937cdc69b6b366355f10a84c16b2.tar.gz
Adapt to the newest Table type, fix some previous adaptation issues
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
Diffstat (limited to 'src/Text/Pandoc/Readers/Org')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index aef6ae210..5dbaa2a17 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -629,14 +629,14 @@ orgToPandocTable (OrgTable colProps heads lns) caption =
else Nothing
in B.table caption (map (convertColProp totalWidth) colProps) heads lns
where
- convertColProp :: Maybe Int -> ColumnProperty -> (Alignment, Maybe Double)
+ convertColProp :: Maybe Int -> ColumnProperty -> (Alignment, ColWidth)
convertColProp totalWidth colProp =
let
align' = fromMaybe AlignDefault $ columnAlignment colProp
width' = (\w t -> (fromIntegral w / fromIntegral t))
<$> columnRelWidth colProp
<*> totalWidth
- in (align', width')
+ in (align', maybe ColWidthDefault ColWidth width')
tableRows :: PandocMonad m => OrgParser m [OrgTableRow]
tableRows = try $ many (tableAlignRow <|> tableHline <|> tableContentRow)