mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-02-11 18:47:26 +01:00
Update Stackage.Database.Haddock
This commit is contained in:
parent
a6217c50bc
commit
3a88c8835b
@ -5,12 +5,12 @@ module Stackage.Database.Haddock
|
|||||||
import qualified Text.Blaze.Html5 as H
|
import qualified Text.Blaze.Html5 as H
|
||||||
import qualified Text.Blaze.Html5.Attributes as A
|
import qualified Text.Blaze.Html5.Attributes as A
|
||||||
import qualified Documentation.Haddock.Parser as Haddock
|
import qualified Documentation.Haddock.Parser as Haddock
|
||||||
import Documentation.Haddock.Types (DocH (..), Hyperlink (..), Picture (..), Header (..), Example (..))
|
import Documentation.Haddock.Types (DocH (..), Hyperlink (..), Picture (..), Header (..), Example (..), MetaDoc(..))
|
||||||
import ClassyPrelude.Conduit
|
import ClassyPrelude.Conduit
|
||||||
import Text.Blaze.Html (Html, toHtml)
|
import Text.Blaze.Html (Html, toHtml)
|
||||||
|
|
||||||
renderHaddock :: Text -> Html
|
renderHaddock :: Text -> Html
|
||||||
renderHaddock = hToHtml . Haddock.toRegular . Haddock.parseParas . unpack
|
renderHaddock = hToHtml . Haddock.toRegular . _doc . Haddock.parseParas . unpack
|
||||||
|
|
||||||
-- | Convert a Haddock doc to HTML.
|
-- | Convert a Haddock doc to HTML.
|
||||||
hToHtml :: DocH String String -> Html
|
hToHtml :: DocH String String -> Html
|
||||||
|
|||||||
@ -150,7 +150,7 @@ library
|
|||||||
, markdown >= 0.1.13
|
, markdown >= 0.1.13
|
||||||
, formatting
|
, formatting
|
||||||
, blaze-html
|
, blaze-html
|
||||||
, haddock-library
|
, haddock-library >= 1.2.0
|
||||||
, async
|
, async
|
||||||
, yesod-gitrepo >= 0.1.1
|
, yesod-gitrepo >= 0.1.1
|
||||||
, hoogle
|
, hoogle
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user