git.iko.soy/typeable/pandoc
on master help sign in
If --strict and not --toc, don't include identifiers in headers.
57d52c3fiddlosopher
src/Text/Pandoc/Writers/HTML.hs+3−1
@@ -271,7 +271,9 @@ blockToHtml opts (Header level lst) = do
271 then ("", [])
271 then ("", [])
272 else (head ids, tail ids)
272 else (head ids, tail ids)
273 put $ st {stIds = rest}
273 put $ st {stIds = rest}
274+ let attribs = if writerStrictMarkdown opts && not (writerTableOfContents opts)
275+ then []
274− let attribs = [identifier id]
276+ else [identifier id]
275 let headerHtml = case level of
277 let headerHtml = case level of
276 1 -> h1 contents ! attribs
278 1 -> h1 contents ! attribs
277 2 -> h2 contents ! attribs
279 2 -> h2 contents ! attribs