@@ -274,9 +274,9 @@ writeEPUB version opts doc@(Pandoc meta _) = do
274274 let navXhtmlFormatter :: Int -> String -> String -> [Element] -> Element
275275 navXhtmlFormatter n tit src subs = unode "li" !
276276 [("id", "toc-li-" ++ show n)] $
277− unode "a" ! [("href",src)] $
278− unode "span" tit :
279− case subs of
277+ (unode "a" ! [("href",src)]
278+ $ (unode "span" tit))
279+ : case subs of
280280 [] -> []
281281 (_:_) -> [unode "ol" subs]
282282