cmark-0.1.0.0: cmark.cabal
name: cmark
version: 0.1.0.0
synopsis: Haskell bindings to libcmark, CommonMark parser and renderer
description:
This package provides Haskell bindings for
<http://github.com/jgm/cmark libcmark>, the reference parser for
<http://commonmark.org CommonMark>. It includes sources for
<http://github.com/jgm/cmark libcmark>, and does not require prior
installation of the C library.
.
cmark provides the following advantages over existing Markdown libraries
for Haskell:
.
- __Speed:__ Conversion speed is on par with the
<https://hackage.haskell.org/package/sundown sundown> library: about
30 times faster than
<https://hackage.haskell.org/package/pandoc pandoc>, 24 times faster
than the Haskell
<https://hackage.haskell.org/package/markdown markdown> package, 8
times faster than
<https://hackage.haskell.org/package/cheapskate cheapskate>.
.
- __Memory footprint:__ Memory footprint is on par with
<https://hackage.haskell.org/package/sundown sundown>. On one
sample, the library uses a fourth the memory that
<https://hackage.haskell.org/package/markdown markdown> uses, and
less than a tenth the memory that
<https://hackage.haskell.org/package/pandoc pandoc> uses.
.
- __Robustness:__ cmark can handle whatever is thrown at it, without
the exponential blowups in parsing time one can sometimes get with
other libraries.
.
- __Accuracy:__ cmark passes the CommonMark spec\'s suite of over 500
conformance tests.
.
- __Standardization:__ Since there is a spec and a comprehensive suite
of tests, we can have a high degree of confidence that any two
CommonMark implementations will behave the same. Thus, for example,
one could use this library for server-side rendering and
<http://github.com/jgm/commonmark.js commonmark.js> for client-side
previewing.
.
- __Ease of installation:__ cmark has minimal dependencies.
.
cmark does not provide Haskell versions of the whole
<http://github.com/jgm/cmark libcmark> API, which is built around
mutable @cmark_node@ objects. Instead, it provides two functions:
.
- @markdownToHtml@ uses <http://github.com/jgm/cmark libcmark>\'s
parser and renderer for a maximally efficient conversion of
CommonMark to HTML (as a Text). (\"Smart punctuation\" and a few
other options can be enabled.)
.
- @parseDocument@ uses <http://github.com/jgm/cmark libcmark>\'s
parser to produce a @Node@ tree that can be processed further using
Haskell. One can transform the tree using generics, convert it to
another kind of structure (such as a Pandoc object that can be
rendered using pandoc\'s renderers) or render it using a custom
rendering function.
.
__A note on security:__ This library does not attempt to sanitize HTML
output. We recommend using
<https://hackage.haskell.org/package/xss-sanitize xss-sanitize> to
filter the output.
.
__A note on stability:__ There is a good chance the API will change
significantly after this early release.
homepage: https://github.com/jgm/commonmark-hs
license: BSD2
license-file: LICENSE
author: John MacFarlane
maintainer: jgm@berkeley.edu
copyright: (C) 2015 John MacFarlane
category: Text
build-type: Simple
extra-source-files: README.md
cmark/bench.h
cmark/chunk.h
cmark/cmark_export.h
cmark/debug.h
cmark/inlines.h
cmark/cmark.h
cmark/houdini.h
cmark/references.h
cmark/utf8.h
cmark/parser.h
cmark/cmark_version.h
cmark/html_unescape.h
cmark/iterator.h
cmark/node.h
cmark/buffer.h
cmark/cmark_ctype.h
cmark/config.h
cmark/scanners.h
cmark/case_fold_switch.inc
cabal-version: >=1.10
Source-repository head
type: git
location: git://github.com/jgm/cmark-hs.git
library
exposed-modules: CMark
build-depends: base >=4.6 && < 4.8, mtl, syb, text >= 1.1 && < 1.3
default-language: Haskell2010
ghc-options: -Wall
Include-dirs: cmark
Includes: cmark.h
c-sources: cmark/houdini_html_u.c
cmark/man.c
cmark/references.c
cmark/utf8.c
cmark/blocks.c
cmark/cmark.c
cmark/html.c
cmark/iterator.c
cmark/node.c
cmark/buffer.c
cmark/cmark_ctype.c
cmark/houdini_href_e.c
cmark/scanners.c
cmark/xml.c
cmark/houdini_html_e.c
cmark/inlines.c
cmark/main.c