snoyberg / markdown

Convert Markdown to HTML, with XSS protection
BSD 3-Clause "New" or "Revised" License
69 stars 401 forks source link

Adapting markdown for use in Haddock #37

Closed harpocrates closed 6 years ago

harpocrates commented 6 years ago

This is more of a question that an issue.

One of the most common requests for Haddock is to support markdown. This has somewhat controversial - everyone agrees Haddock is suboptimal but the path forward is still unclear. I'd like to try implementing a module level option where Haddock-the-tool expects all documentation to be markdown instead.

There are already a bunch of things to solve here, not the least of which is parsing markdown without adding any dependencies to Haddock. This package seems like the best candidate for this. The only dependency that is more of a challenge to extricate is conduit. Would you be OK if some form of this library ended up in Haddock?

Furthermore, are there any licensing issues here?

Thanks in advance!

snoyberg commented 6 years ago

Some hopefully straightforward answers:

  1. I have no problem with this code dropping a dependency on conduit if you or someone else wants to send a PR.
  2. There is no issue with this code being used in Haddock from my perspective. I believe the licenses are compatible. If not, I'm happy to arrange relicensing.
  3. I use this library extensively in many places, but I'm also aware that there are legitimate concerns about how well it parses Markdown. You may want to investigate that before choosing this library as the basis for work in Haddock.

For the record: I would be very happy if Haddock supported Markdown syntax, so big +1 from me :)

On Tue, Jan 9, 2018 at 11:00 AM, Alec Theriault notifications@github.com wrote:

This is more of a question that an issue.

One of the most common requests for Haddock is to support markdown. This has somewhat controversial - everyone agrees Haddock is suboptimal but the path forward is still unclear. I'd like to try implementing a module level option where Haddock-the-tool expects all documentation to be markdown instead.

There are already a bunch of things to solve here, not the least of which is parsing markdown without adding any dependencies to Haddock. This package seems like the best candidate for this. The only dependency that is more of a challenge to extricate is conduit. Would you be OK if some form of this library ended up in Haddock?

Furthermore, are there any licensing issues here?

Thanks in advance!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/snoyberg/markdown/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/AADBB__6eg48c733bHKiUwSdibHzhkzrks5tI7dYgaJpZM4RYSnv .

harpocrates commented 6 years ago

Thanks!

  1. I have no problem with this code dropping a dependency on conduit if you or someone else wants to send a PR.

Hardly worth it. Conduit makes reasoning about about space/time easier. Similarly, most people want to be able to generate the HTML using the blaze dependency and have XSS protection. Haddock, on the other hand, is likely to be processing relatively small snippets, already has HTML generation, and needs to have not external dependencies (apart for attoparsec)...

  1. There is no issue with this code being used in Haddock from my perspective. I believe the licenses are compatible. If not, I'm happy to arrange relicensing.

I think so too - I still figured it be nice to ask.

  1. I use this library extensively in many places, but I'm also aware that there are legitimate concerns about how well it parses Markdown. You may want to investigate that before choosing this library as the basis for work in Haddock.

Tossing aside markdown libraries that are just bindings to C libraries this library and cheapskate are the only reasonable choices. I'll be investigating cheapskate next.

Thanks again!