aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/RTF.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/RTF.hs')
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs
index cf27011c2..6df1ffb25 100644
--- a/src/Text/Pandoc/Writers/RTF.hs
+++ b/src/Text/Pandoc/Writers/RTF.hs
@@ -272,8 +272,9 @@ tableRowToRTF header indent aligns sizes' cols = do
else sizes'
columns <- T.concat <$>
zipWithM (tableItemToRTF indent) aligns cols
- let rightEdges = tail $ scanl (\sofar new -> sofar + floor (new * totalTwips))
- (0 :: Integer) sizes
+ let rightEdges =
+ fromMaybe [] $ viaNonEmpty tail $ scanl
+ (\sofar new -> sofar + floor (new * totalTwips)) (0 :: Integer) sizes
let cellDefs = map (\edge -> (if header
then "\\clbrdrb\\brdrs"
else "") <> "\\cellx" <> tshow edge)