diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-20 18:42:09 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-20 18:42:09 +0000 |
commit | 57d52c39ec30e785d6014c59088596a2d2a6645b (patch) | |
tree | bab13265f02ac712b8e0948c64b5be2022583426 /src/Text | |
parent | da518d36c830d6acec678a540937f9773ce59940 (diff) | |
download | pandoc-57d52c39ec30e785d6014c59088596a2d2a6645b.tar.gz |
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
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 4 |
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 |