[web-devel] ANN: sundown 0.5
f at mazzo.li
Thu Jul 19 12:31:16 CEST 2012
Prompted a recent discussion on this list, I have updated my `sundown'
sundown is a C Markdown parser and renderer that powers GitHub, and I've
maintained Haskell bindings for a while. After reading the mentioned thread on
this mailing list I updated its interface to use the `String' and `Text' types
instead of raw `ByteString's. This should make using the library safer and more
My original intention was to exploit the C library to produce output in the form
of datatypes familiar to the Haskell world (e.g. the ones from the `html' or
`blaze-html' package). After thinking about this a bit I'm not so sure it's
worth it. Given the free-form nature of the Markdown format - the user can
freely include his own html in - I don't think that manipulating the Html output
is a common use case, and the Html produced might be invalid anyway.
Moreover, while having a more Haskelly output can be done, the code would be
quite brittle and reliant on internals of the sundown library, given the nature
of its interface to add additional backends (in short: the output is supposed to
be text-based, so I'd have to hack my way around that by knowing in what order
compound elements are rendered).
For this reason I have decided to leave the library as it is. If somebody has
compelling counterarguments I might reconsider :).
Francesco * Often in error, never in doubt
More information about the web-devel