-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use haddock-library for parsing package descriptions #46
Comments
That looks useful, I'd like to add this support. I'm having trouble figuring out the right way to convert a |
Oh, looks like it's just a manual pattern-matching process, isn't it? |
If you want to do the HTML rendering yourself then you can just match on the AST the parser spits out pretty trivially. If you want to use Haddock to do this job then we still need to make this functionality more accessible: it's currently in Haddock core and is behind the scary restriction of single GHC version; We have an issue open at haskell/haddock#243 which I hoped to get into next major GHC release (7.10.x) but unfortunately didn't have a good chance to do and may have to push it back considering the RC is Soon™… I think just extracting the part that does comment → HTML should be pretty easy however so maybe just that can still be done and moved to Haddock library. The only ‘problem’ is that it won't be able to hyperlink identifiers if done this way as we need GHC for that. |
Fair enough, thanks for the response. I'm testing out an implementation now, I've just run into a separate issue that I need to diagnose first. |
Alright, here's my HTML rendering function: e755ea6#diff-2de6d9a0f9a1be4f5b9c746b1040398eR294 I haven't gotten it to update the entire server database yet, that's what's holding things up right now. Seems that inserting 47,000 times into a HashMap is slow for some reason... |
OK, fixed, it wasn't using the updated code for some reason. @Fuuzetsu Thanks for the Haddock-parsing library, made this rather straightforward! @sol Thanks for pointing this out, can you have a look at the package page and let me know how it works for you? |
Looks good :) |
Hackage supports markup in package descriptions. The syntax tries to resemble Haddock syntax. Stackage does not interpret markup in package descriptions yet (e.g. looking at hspec, the list is not marked up and URLs in
<..>
are not turned into links).The Haddock parser is now available as a separate library, so it can be used to parse package descriptions and create proper HTML from that. I think with this it may be quite easy to add support for markup in package descriptions to Stackage.
(CCing @Fuuzetsu)
The text was updated successfully, but these errors were encountered: