Merge pull request #246 from fpco/pretty-again

Switch back to pretty style
This commit is contained in:
Michael Snoyman 2017-12-11 13:44:26 +02:00 committed by GitHub
commit a83629f09a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,12 +36,7 @@ getHaddockR slug rest
]
req <- parseRequest $ unpack $ makeURL slug rest
(_, res) <- acquireResponse req >>= allocateAcquire
mstyle' <- lookupGetParam "style"
-- TODO: Uncomment line above. Restyling is really slow right now, still need to debug it.
let mstyle =
case mstyle' of
Just "pretty" -> Nothing
_ -> Just ("plain" :: Text)
mstyle <- lookupGetParam "style"
case mstyle of
Just "plain" -> respondSource "text/html; charset=utf-8"
$ responseBody res .| mapC (Chunk . toBuilder)