aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-08-29 18:56:24 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-08-29 18:56:24 -0400
commit7ae9621a874f945e3b5e249129384d8bb87850c6 (patch)
treed0b4d64d4ce0b5f464a896084f088db6c7476f61 /src/Text
parenta3a3e3fdbf4968d56f65b7865fa798e96e40daaa (diff)
downloadpandoc-7ae9621a874f945e3b5e249129384d8bb87850c6.tar.gz
Docx reader: clean up function with `traverse`
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
index 3f90a56e9..7ef3e7554 100644
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -421,12 +421,7 @@ dummyAnchors :: [String]
dummyAnchors = ["_GoBack"]
makeHeaderAnchor :: Blocks -> DocxContext Blocks
-makeHeaderAnchor bs = case viewl $ unMany bs of
- (x :< xs) -> do
- x' <- (makeHeaderAnchor' x)
- xs' <- (makeHeaderAnchor $ Many xs)
- return $ (singleton x') <> xs'
- EmptyL -> return mempty
+makeHeaderAnchor bs = traverse makeHeaderAnchor' bs
makeHeaderAnchor' :: Block -> DocxContext Block
-- If there is an anchor already there (an anchor span in the header,