EPUB: Fixed invalid nesting problem in nav.xhtml.

This commit is contained in:
John MacFarlane 2012-11-02 21:12:56 -07:00
parent e9542a60b5
commit afa5a4da67

View file

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