forked from marko/svitak
improve chapter name sanitization
This commit is contained in:
parent
237d653d69
commit
f17f6a63e2
1 changed files with 2 additions and 1 deletions
|
|
@ -132,7 +132,8 @@ extractTocFromEntry fullPath = do
|
|||
getChapter :: (InternalPath, T.Text) -> ChapterIndex -> EpubAction Chapter
|
||||
getChapter (InternalPath filename, tocTitle) idx = do
|
||||
env <- ask
|
||||
let full = normalise (baseDir env </> filename)
|
||||
let bare = takeWhile (/= '#') filename
|
||||
let full = normalise (baseDir env </> bare)
|
||||
case findEntryByPath full (archive env) of
|
||||
Nothing -> pure $ Chapter tocTitle "" idx
|
||||
Just e -> do
|
||||
|
|
|
|||
Loading…
Reference in a new issue