@@ -46,7 +46,7 @@ import Numeric ( showHex )
4646import Data.Char ( ord, toLower )
4747import Data.List ( isPrefixOf, intersperse )
4848import Data.String ( fromString )
49−import Data.Maybe ( catMaybes, fromMaybe )
49+import Data.Maybe ( catMaybes, fromMaybe, isJust )
5050import Control.Monad.State
5151import Text.Blaze.Html hiding(contents)
5252#if MIN_VERSION_blaze_markup(0,6,3)
@@ -825,7 +825,9 @@ inlineToHtml opts inline =
825825 writerIdentifierPrefix opts ++ "fn" ++ ref)
826826 ! A.class_ "footnoteRef"
827827 ! prefixedId opts ("fnref" ++ ref)
828− $ H.sup
828+ $ (if isJust (writerEpubVersion opts)
829+ then id
830+ else H.sup)
829831 $ toHtml ref
830832 return $ case writerEpubVersion opts of
831833 Just EPUB3 -> link ! customAttribute "epub:type" "noteref"