Use the original tail instead of deconstructing and reconstructing it (#6678)

This commit is contained in:
Joseph C. Sible 2020-09-11 16:49:01 -04:00 committed by GitHub
parent 315b5a4836
commit 6fda8cfa28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -854,8 +854,8 @@ blocksToOpenXML opts = fmap concat . mapM (blockToOpenXML opts) . separateTables
-- them. See #4315.
separateTables :: [Block] -> [Block]
separateTables [] = []
separateTables (x@Table{}:y@Table{}:zs) =
x : RawBlock (Format "openxml") "<w:p />" : separateTables (y:zs)
separateTables (x@Table{}:xs@(Table{}:_)) =
x : RawBlock (Format "openxml") "<w:p />" : separateTables xs
separateTables (x:xs) = x : separateTables xs
pStyleM :: (PandocMonad m) => ParaStyleName -> WS m XML.Element