aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-15 22:35:25 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-15 22:35:25 -0800
commit53eb2c4828d09fa00dce327f0b69e252287d82ca (patch)
tree3be9d365f85424a77c1d5d98d838b677eb1fd990 /src/Text/Pandoc/Writers
parent19234efc95b03970b9ef22339cca5497a5ceff61 (diff)
downloadpandoc-53eb2c4828d09fa00dce327f0b69e252287d82ca.tar.gz
HTML writer: Add ids to <section> tags.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 901575434..93f96b2f9 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -233,7 +233,8 @@ elementToHtml opts (Sec level num id' title' elements) = do
then toHtmlFromList stuff
else if writerSectionDivs opts
then if writerHtml5 opts
- then tag "section" << stuff
+ then tag "section" ! [prefixedId opts id']
+ << stuff
else thediv ! [prefixedId opts id'] << stuff
else toHtmlFromList stuff