Merge pull request #339 from kadoban/docbook

let pandoc handle DocBook files
This commit is contained in:
Jasper Van der Jeugt 2015-04-03 15:14:08 +02:00
commit df9dba3ef4
2 changed files with 3 additions and 0 deletions

View file

@ -49,6 +49,7 @@ readPandocWith :: ReaderOptions -- ^ Parser options
readPandocWith ropt item = fmap (reader ropt (itemFileType item)) item readPandocWith ropt item = fmap (reader ropt (itemFileType item)) item
where where
reader ro t = case t of reader ro t = case t of
DocBook -> readDocBook ro
Html -> readHtml ro Html -> readHtml ro
LaTeX -> readLaTeX ro LaTeX -> readLaTeX ro
LiterateHaskell t' -> reader (addExt ro Ext_literate_haskell) t' LiterateHaskell t' -> reader (addExt ro Ext_literate_haskell) t'

View file

@ -22,6 +22,7 @@ import Hakyll.Core.Item
data FileType data FileType
= Binary = Binary
| Css | Css
| DocBook
| Html | Html
| LaTeX | LaTeX
| LiterateHaskell FileType | LiterateHaskell FileType
@ -39,6 +40,7 @@ fileType :: FilePath -> FileType
fileType = uncurry fileType' . splitExtension fileType = uncurry fileType' . splitExtension
where where
fileType' _ ".css" = Css fileType' _ ".css" = Css
fileType' _ ".dbk" = DocBook
fileType' _ ".htm" = Html fileType' _ ".htm" = Html
fileType' _ ".html" = Html fileType' _ ".html" = Html
fileType' f ".lhs" = LiterateHaskell $ case fileType f of fileType' f ".lhs" = LiterateHaskell $ case fileType f of