-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide means of rendering pretty HTML #2
Comments
Also wow is that being |
HTML it returns isn't even correct :\ |
Do you get the same issue with this one ? A {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
import Data.Typeable (Typeable)
import qualified Network.HTTP.Media as M
import Servant.API (Accept (..), MimeRender (..))
import Text.Blaze.Html (Html, ToMarkup, toHtml)
import Text.Blaze.Html.Renderer.Pretty (renderHtml)
data PrettyHTML deriving Typeable
-- | @text/html;charset=utf-8@
instance Accept PrettyHTML where
contentType _ = "text" M.// "html" M./: ("charset", "utf-8")
instance OVERLAPPABLE_ ToMarkup a => MimeRender PrettyHTML a where
mimeRender _ = renderHtml . toHtml
instance OVERLAPPING_ MimeRender PrettyHTML Html where
mimeRender _ = renderHtml |
@alpmestan that is the same renderer that's broken, look: https://hackage.haskell.org/package/blaze-html-0.8.1.2/docs/src/Text-Blaze-Html-Renderer-Pretty.html#renderHtml The method of furnishing pretty HTML (changing type) seems fine to me, but I'm a bit galled that there isn't a working pretty HTML renderer. |
Oh, it just calls out to the other. Well, if you fix it or find another one, we can put together a PR for a pretty HTML combinator :) |
https://hackage.haskell.org/package/blaze-markup-0.7.0.2/docs/Text-Blaze-Renderer-Pretty.html
The text was updated successfully, but these errors were encountered: