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.
This commit is contained in:
parent
2893b0055a
commit
9f6fd6139f
1 changed files with 1 additions and 1 deletions
|
@ -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) =
|
||||
|
|
Loading…
Add table
Reference in a new issue