diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-08-28 18:12:02 -0400 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-08-28 18:12:02 -0400 |
commit | 9f6fd6139f78573b449e14dce948a5b3c3fab4f3 (patch) | |
tree | 0f8298d7384b7193732d583019f173829fb7d39b | |
parent | 2893b0055aacb08e0970c6b7993f5385ef707884 (diff) | |
download | pandoc-9f6fd6139f78573b449e14dce948a5b3c3fab4f3.tar.gz |
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.
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 2 |
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) = |