CommonMark parsing and rendering library and program in C

Edit Package cmark

cmark is the C reference implementation of CommonMark, a rationalized version of Markdown syntax with a spec. (For the JavaScript reference implementation, see commonmark.js.)

It provides a shared library (libcmark) with functions for parsing CommonMark documents to an abstract syntax tree (AST), manipulating the AST, and rendering the document to HTML, groff man, LaTeX, CommonMark, or an XML representation of the AST. It also provides a command-line program (cmark) for parsing and rendering CommonMark documents.

Refresh
Refresh
Source Files
Filename Size Changed
cmark-0.30.0.tar.gz 0000244190 238 KB
cmark.changes 0000029231 28.5 KB
cmark.spec 0000003007 2.94 KB
Revision 11 (latest revision is 15)
Dominique Leuenberger's avatar Dominique Leuenberger (dimstar_suse) accepted request 901086 from Ondřej Súkup's avatar Ondřej Súkup (mimi_vx) (revision 11)
- update to 0.30.0
  * Use official 0.30 spec.txt.
  * Add `cmark_get_default_mem_allocator()` (#330).  API change: this
    adds a new exported function in cmark.h.
  * Fix #383.  An optimization we used for emphasis parsing was
    too aggressive, causing us to miss some emphasis that was legal
    according to the spec.  We fix this by indexing the `openers_bottom`
    table not just by the type of delimiter and the length of the
    closing delimiter mod 3, but by whether the closing delimiter
    can also be an opener.  (The algorithm for determining emphasis
    matching depends on all these factors.)  Add regression test.
  * Fix quadratic behavior with inline HTML (#299, Nick Wellnhofer).
    Repeated starting sequences like `<?`, `<!DECL ` or `<![CDATA[` could
    lead to quadratic behavior if no matching ending sequence was found.
    Separate the inline HTML scanners. Remember if scanning the whole input
    for a specific ending sequence failed and skip subsequent scans.
  * Speed up hierarchy check in tree manipulation API (Nick Wellnhofer).
    Skip hierarchy check in the common case that the inserted child has
    no children.
  * Fix quadratic behavior when parsing inlines (#373, Nick Wellnhofer).
    The inline parsing code would call `cmark_node_append_child` to append
    nodes. This public function has a sanity check which is linear in the
    depth of the tree. Repeated calls could show quadratic behavior in
    degenerate trees. Use a special function to append nodes without this
    check.  (Issue found by OSS-Fuzz.)
  * Replace invalid characters in XML output (#365, Nick wellnhofer).
    Control characters, U+FFFE and U+FFFF aren't allowed in XML 1.0, so
    replace them with U+FFFD (replacement character). This doesn't solve
    the problem how to roundtrip these characters, but at least we don't
    produce invalid XML. (forwarded request 901085 from mimi_vx)
Comments 0
openSUSE Build Service is sponsored by