diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-08-29 18:56:24 -0400 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-08-29 18:56:24 -0400 |
commit | 7ae9621a874f945e3b5e249129384d8bb87850c6 (patch) | |
tree | d0b4d64d4ce0b5f464a896084f088db6c7476f61 | |
parent | a3a3e3fdbf4968d56f65b7865fa798e96e40daaa (diff) | |
download | pandoc-7ae9621a874f945e3b5e249129384d8bb87850c6.tar.gz |
Docx reader: clean up function with `traverse`
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 7 |
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, |