Package0.2.6Text
commonmark
Pure Haskell commonmark parser.
- Version0.2.6
- CategoryText
- LicenceBSD-3-Clause
- AuthorJohn MacFarlane
- Maintainerjgm@berkeley.edu
- Homepagegithub.com/jgm/commonmark-hs
- Pinned byhackage commonmark 0.2.6
- Sourcehackage.haskell.org/package/commonmark-0.2.6
Modules
13 modules- Commonmark0The basic task of this library is to parse text as commonmark.
- Commonmark.Blocks37
- Commonmark.Entity5
- Commonmark.Html9
- Commonmark.Inlines23
- Commonmark.Parser4
- Commonmark.ReferenceMap5
- Commonmark.SourceMap4
- Commonmark.Syntax2
- Commonmark.Tag8
- Commonmark.TokParsers21
- Commonmark.Tokens5
- Commonmark.Types17
Description
This library provides the core data types and functions for parsing commonmark (https://spec.commonmark.org). The parser is fully commonmark-compliant and passes the test suite. It is designed to be customizable and easily extensible. To customize the output, create an AST, or support a new output format, one need only define some new typeclass instances. It is also easy to add new syntax elements or modify existing ones.
Accurate information about source positions is available for all block and inline elements. Thus the library can be used to create an accurate syntax highlighter or an editor with live preview.
The parser has been designed for robust performance even in pathological cases that tend to cause stack overflows or exponential slowdowns in other parsers, with parsing speed that varies linearly with input length.
Related packages:
commonmark-extensions (which defines a number of syntax extensions) commonmark-pandoc (which allows using this parser to create a Pandoc structure) commonmark-cli (a command-line tool for converting and syntax-highlighting commonmark documents)
Depends on
8 packages- base-4.20.2.0with GHC
- bytestring-0.12.2.0with GHC
- containers-0.7with GHC
- parsec-3.1.18.0with GHC
- text-2.1.3with GHC
- transformers-0.6.1.1with GHC
- unicode-data-0.4.0.1in this set
- unicode-transforms-0.4.0.1in this set