From 57d52c39ec30e785d6014c59088596a2d2a6645b Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Mon, 20 Aug 2007 18:42:09 +0000 Subject: 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 --- src/Text/Pandoc/Writers/HTML.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text') 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 -- cgit v1.2.3