@@ -595,7 +595,8 @@ pandocToEPUB version opts doc = do
595595 <> cssvars True <> vars } pdoc
596596 where (pdoc, bodyType) =
597597 case bs of
598− (Header _ (_,_,kvs) xs : _) ->
598+ (Div (_,"section":_,kvs)
599+ (Header _ _ xs : _) : _) ->
599600 -- remove notes or we get doubled footnotes
600601 (Pandoc (setMeta "title"
601602 (walk removeNote $ fromList xs) nullMeta) bs,