git.iko.soy/typeable/pandoc
on master help sign in
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

commit57d52c39ec30e785d6014c59088596a2d2a6645b authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 20 Aug 2007, 18:42 (19 years ago) parentda518d3
1 file changed+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
@@ -271,7 +271,9 @@ blockToHtml opts (Header level lst) = do
271271 then ("", [])
272272 else (head ids, tail ids)
273273 put $ st {stIds = rest}
274− let attribs = [identifier id]
274+ let attribs = if writerStrictMarkdown opts && not (writerTableOfContents opts)
275+ then []
276+ else [identifier id]
275277 let headerHtml = case level of
276278 1 -> h1 contents ! attribs
277279 2 -> h2 contents ! attribs