@@ -751,12 +751,13 @@ pandocToEPUB version opts doc@(Pandoc meta _) = do
751751 (writeHtmlStringForEPUB version
752752 opts{ writerTemplate = Nothing }
753753 (Pandoc nullMeta
754− [Plain $ walk delink tit])) of
754+ [Plain $ walk clean tit])) of
755755 Left _ -> TS.pack $ stringify tit
756756 Right x -> x
757− -- can't have a element inside a...
758− delink (Link _ ils _) = Span ("", [], []) ils
759− delink x = x
757+ -- can't have <a> elements inside generated links...
758+ clean (Link _ ils _) = Span ("", [], []) ils
759+ clean (Note _) = Str ""
760+ clean x = x
760761
761762 let navtag = if epub3 then "nav" else "div"
762763 tocBlocks <- lift $ evalStateT (mapM (navPointNode navXhtmlFormatter) secs) 1