summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-20 18:42:09 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-20 18:42:09 +0000
commit57d52c39ec30e785d6014c59088596a2d2a6645b (patch)
treebab13265f02ac712b8e0948c64b5be2022583426
parentda518d36c830d6acec678a540937f9773ce59940 (diff)
If --strict and not --toc, don't include identifiers in headers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@875 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index ace5cfe5f..cad0915df 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -271,7 +271,9 @@ blockToHtml opts (Header level lst) = do
then ("", [])
else (head ids, tail ids)
put $ st {stIds = rest}
- let attribs = [identifier id]
+ let attribs = if writerStrictMarkdown opts && not (writerTableOfContents opts)
+ then []
+ else [identifier id]
let headerHtml = case level of
1 -> h1 contents ! attribs
2 -> h2 contents ! attribs