summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-08-28 18:12:02 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-08-28 18:12:02 -0400
commit9f6fd6139f78573b449e14dce948a5b3c3fab4f3 (patch)
tree0f8298d7384b7193732d583019f173829fb7d39b /src
parent2893b0055aacb08e0970c6b7993f5385ef707884 (diff)
Docx reader: use all anchor spans for header ids.
Previously we only used the first anchor span to affect header ids. This allows us to use all the anchor spans in a header, whether they're nested or not. Along with 62882f97, this closes #3088.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
index 83b34ad00..c33648977 100644
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -441,7 +441,7 @@ makeHeaderAnchor' (Header n (ident, classes, kvs) ils)
newIls = concatMap f ils where f il | il == c = cIls
| otherwise = [il]
modify $ \s -> s {docxAnchorMap = M.insert anchIdent newIdent hdrIDMap}
- return $ Header n (newIdent, classes, kvs) newIls
+ makeHeaderAnchor' $ Header n (newIdent, classes, kvs) newIls
-- Otherwise we just give it a name, and register that name (associate
-- it with itself.)
makeHeaderAnchor' (Header n (ident, classes, kvs) ils) =