From 9f6fd6139f78573b449e14dce948a5b3c3fab4f3 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Sun, 28 Aug 2016 18:12:02 -0400 Subject: 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. --- src/Text/Pandoc/Readers/Docx.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers/Docx.hs') 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) = -- cgit v1.2.3