aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-14 23:46:25 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-14 23:46:25 -0800
commit9e75b9b84bd7775bb9392d578a52a7def9820c13 (patch)
treeb12504ffb1ca7362b809ae8647abc3e0957b95e8 /src/Text/Pandoc
parent269b33d24bba08a98ff4572f1537f0473bbae7dd (diff)
downloadpandoc-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.hs3
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