git.iko.soy/typeable/pandoc
on master help sign in
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.

commit9f6fd6139f78573b449e14dce948a5b3c3fab4f3 authorJesse Rosenthal <jrosenthal@jhu.edu> dateSun 28 Aug 2016, 18:12 (10 years ago) parent2893b00
1 file changed+1−1
src/Text/Pandoc/Readers/Docx.hs+1−1
src/Text/Pandoc/Readers/Docx.hs+1−1
@@ -441,7 +441,7 @@ makeHeaderAnchor' (Header n (ident, classes, kvs) ils)
441441 newIls = concatMap f ils where f il | il == c = cIls
442442 | otherwise = [il]
443443 modify $ \s -> s {docxAnchorMap = M.insert anchIdent newIdent hdrIDMap}
444− return $ Header n (newIdent, classes, kvs) newIls
444+ makeHeaderAnchor' $ Header n (newIdent, classes, kvs) newIls
445445-- Otherwise we just give it a name, and register that name (associate
446446-- it with itself.)
447447makeHeaderAnchor' (Header n (ident, classes, kvs) ils) =