EPUB writer: Strip out footnotes from toc entries.
This commit is contained in:
parent
ba6a26b258
commit
d97b1fd14c
1 changed files with 6 additions and 5 deletions
|
@ -124,7 +124,12 @@ opfName n = QName n Nothing (Just "opf")
|
|||
|
||||
plainify :: [Inline] -> String
|
||||
plainify t =
|
||||
trimr $ writePlain def{ writerStandalone = False } $ Pandoc nullMeta [Plain t]
|
||||
trimr $ writePlain def{ writerStandalone = False }
|
||||
$ Pandoc nullMeta [Plain $ walk removeNote t]
|
||||
|
||||
removeNote :: Inline -> Inline
|
||||
removeNote (Note _) = Str ""
|
||||
removeNote x = x
|
||||
|
||||
getEPUBMetadata :: WriterOptions -> Meta -> IO EPUBMetadata
|
||||
getEPUBMetadata opts meta = do
|
||||
|
@ -397,10 +402,6 @@ writeEPUB opts doc@(Pandoc meta _) = do
|
|||
|
||||
let chapters = evalState (toChapters blocks'') []
|
||||
|
||||
let removeNote :: Inline -> Inline
|
||||
removeNote (Note _) = Str ""
|
||||
removeNote x = x
|
||||
|
||||
let chapToEntry :: Int -> Chapter -> Entry
|
||||
chapToEntry num (Chapter mbnum bs) = mkEntry (showChapter num)
|
||||
$ renderHtml
|
||||
|
|
Loading…
Add table
Reference in a new issue