Merge pull request #339 from kadoban/docbook
let pandoc handle DocBook files
This commit is contained in:
commit
df9dba3ef4
2 changed files with 3 additions and 0 deletions
|
@ -49,6 +49,7 @@ readPandocWith :: ReaderOptions -- ^ Parser options
|
|||
readPandocWith ropt item = fmap (reader ropt (itemFileType item)) item
|
||||
where
|
||||
reader ro t = case t of
|
||||
DocBook -> readDocBook ro
|
||||
Html -> readHtml ro
|
||||
LaTeX -> readLaTeX ro
|
||||
LiterateHaskell t' -> reader (addExt ro Ext_literate_haskell) t'
|
||||
|
|
|
@ -22,6 +22,7 @@ import Hakyll.Core.Item
|
|||
data FileType
|
||||
= Binary
|
||||
| Css
|
||||
| DocBook
|
||||
| Html
|
||||
| LaTeX
|
||||
| LiterateHaskell FileType
|
||||
|
@ -39,6 +40,7 @@ fileType :: FilePath -> FileType
|
|||
fileType = uncurry fileType' . splitExtension
|
||||
where
|
||||
fileType' _ ".css" = Css
|
||||
fileType' _ ".dbk" = DocBook
|
||||
fileType' _ ".htm" = Html
|
||||
fileType' _ ".html" = Html
|
||||
fileType' f ".lhs" = LiterateHaskell $ case fileType f of
|
||||
|
|
Loading…
Reference in a new issue