diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-12-14 23:46:25 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-12-14 23:46:25 -0800 |
commit | 9e75b9b84bd7775bb9392d578a52a7def9820c13 (patch) | |
tree | b12504ffb1ca7362b809ae8647abc3e0957b95e8 /src/Text/Pandoc | |
parent | 269b33d24bba08a98ff4572f1537f0473bbae7dd (diff) | |
download | pandoc-9e75b9b84bd7775bb9392d578a52a7def9820c13.tar.gz |
DocBook readers: Include id on section headers.
Closes #1818.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index 6fd49cf61..663960a87 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -868,8 +868,9 @@ parseBlock (Elem e) = Nothing -> return mempty modify $ \st -> st{ dbSectionLevel = n } b <- getBlocks e + let ident = attrValue "id" e modify $ \st -> st{ dbSectionLevel = n - 1 } - return $ header n' headerText <> b + return $ headerWith (ident,[],[]) n' headerText <> b metaBlock = acceptingMetadata (getBlocks e) >> return mempty getInlines :: Element -> DB Inlines |