@@ -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