Up to [cvs.NetBSD.org] / pkgsrc / textproc / cmark
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
cmark: updated to 0.31.0
0.31.0
* Update to 0.31.2 spec.txt.
* Treat unicode Symbols like Punctuation, as per the 0.31 spec.
* Add a new function to `utf8.h`:
`int cmark_utf8proc_is_punctuation_or_symbol(int32_t uc)`.
The old `cmark_utf8proc_is_punctuation` has been kept for
now, but it is no longer used.
* Add new exported function `cmark_parser_new_with_mem_into_root`
(API change) (John Ericson).
* Avoid repeated `language-` in info string
* Fix quadratic behavior in `S_insert_emph` (Nick Wellnhofer).
Fixes part of GHSA-66g8-4hjf-77xh.
* Fix quadratic behavior in `check_open_blocks` (Nick Wellnhofer).
Fixes part of GHSA-66g8-4hjf-77xh.
* Track underscore bottom separately mod 3, like asterisk (Michael
Howell). This was already implemented correctly for asterisks,
but not for underscore.
* Use `fwrite` instead of `printf` to print results in main
This avoids a massive slowdown in MSYS2.
* commonmark writer: less aggressive escaping for `!`
* Update libFuzzer build (Nick Wellnhofer):
+ Move fuzzing files into their own directory.
+ Use libFuzzer the modern way by compiling and linking with
`-fsanitize=fuzzer(-no-link)` without requiring `LIB_FUZZER_PATH`.
+ Update the `libFuzzer` rule in Makefile and the README.md.
* CMake build changes (Saleem Abdulrasool).
+ Inline multiple variables in CMake, following CMake recommendations.
+ Simplify the version computation.
+ Remove the `CMARK_STATIC` and `CMARK_SHARED` options as one of the two
must be enabled always as the cmark executable depends on the library.
Instead of having a custom flag to discern between the
library type, use the native CMake option `BUILD_SHARED_LIBS`,
allowing the user to control which library to build. This matches
CMake recommendations to only build a single copy of the library.
+ Introduce an author warning for the use of `CMARK_SHARED` and
`CMARK_STATIC` to redirect the author of the dependent package to
`BUILD_SHARED_LIBS`.
+ Permit incremental linking on Windows. Although incremental linking
does introduce padding in the binary for incremental links, that
should not matter for release mode builds in theory as `/OPT:REF`
and `/OPT:ICF` will trigger full links, which is the default in
release mode.
+ Hoist the CMake module inclusion to the top level.
+ Minor tweaks for speeding up the configure phase.
Restructure the file layout to place the custom modules into the
`cmake/modules` directory that is the common layout for CMake based
projects.
+ Squelch C4232 warnings on MSVC builds.
+ Remove check for `__builtin_expect`. Use `__has_builtin` to check
at compile time if the feature is supported.
This macro is supported by both clang and GCC (as of 10).
In the case that the compiler in use is not new enough, we still
provide the fallback so that the code will compile but without the
additional hints for the branch probability. `config.h` has been
removed from the code base as it is no longer needed.
+ Remove `/TP` usage on MSVC and replace `CMARK_INLINE` with `inline`.
These were workarounds for pre-VS2015 compilers, which are no longer
supported.
+ Hoist the C visibility settings to top level
+ Clean up C4267 warnings on MSVC builds.
+ Remove some compiler compatibility checks that are no longer
needed because VS 2013 is no longer supported
+ Adjust the policy to silence warnings on MSVC builds
CMake 3.15+ remove `/W3` from the language flags under MSVC with
CMP0092. Set the policy to new to avoid the D9025 warning.
+ Reflow some text to match CMake documentation style
+ Use generator expression for path computation.
+ Use CMake to propagate `CMARK_STATIC_DEFINE`.
+ Clean up an obsoleted variable (NFC).
+ Hoist the policy settings. Policy settings may impact how
`project` functions. They should be set immediately after
`cmake_minimum_required` (which implicitly sets policies).
Use the `POLICY` check to see if a policy is defined rather
than using a version check.
+ Replace `CMARK_TESTS` with CMake sanctioned `BUILD_TESTING`.
+ Correct typo and adjust command invocation. Use the proper
generator expression for the python interpreter and adjust
a typo in the component name.
+ Add an upgrade path for newer CMake.
CMake 3.12 deprecated `FindPythonInterp`, and with CMake 3.27, were
obsoleted with CMP0148. Add a version check and switch to the new
behaviour to allow building with newer releases.
* Fix regex syntax warnings in `pathological_tests.py` (Nick Wellnhofer).
* `test/cmark.py`: avoid star imports (Jakub Wilk).
* `spec_tests.py`: Add option to generate fuzz corpus (Nick Wellnhofer).
Add an option `--fuzz-corpus` that writes the test cases to separate
files including the options header, so they can be used as seed corpus
for fuzz testing.
* Fix some cmark.3 man rendering issues so we can do a clean regen
(John Ericson).
* Update Windows compilation instructions
cmark: updated to 0.30.1
[0.30.1]
* Properly indent block-level contents of list items in man.
This handles nested lists as well as items with multiple paragraphs.
The change requires addition of a new field block_number_in_list_item
to cmark_renderer, but this does not change the public API.
* Fix quadratic behavior when parsing emphasis (Nick
Wellnhofer). Delimiters can be deleted, so store delimiter positions
instead of pointers in `openers_bottom`. Besides causing undefined
behavior when reading a dangling pointer, this could also result
in quadratic behavior when parsing emphasis.
* Fix quadratic behavior when parsing smart quotes (Nick Wellnhofer).
Remove matching smart quote delimiters. Otherwise, the same opener
could be found over and over, preventing the `openers_bottom`
optimization from kicking in and leading to quadratic behavior when
processing lots of quotes.
* Modify CMake configuration so that the project can be built with
older versions of CMake (Saleem Abdulrasool). (In 0.30.0,
some features were used that require CMake >= 3.3.) The cost of this
backwards compatibility is that developers must now explicitly invoke
`cmark_add_compile_options` when a new compilation target is added.
* Remove a comma at the end of an enumerator list, which was flagged
by clang as a C++11 extension.
* make_man_page.py: use absolute path with CDLL. This avoids the error
"file system relative paths not allowed in hardened programs."
* Include cmark version in cmark(3) man page (instead of LOCAL).
[0.30.0]
* Use official 0.30 spec.txt.
* Add `cmark_get_default_mem_allocator()`. API change: this
adds a new exported function in cmark.h.
* 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 (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 (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 (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.
* Avoid quadratic output growth with reference links (Nick Wellnhofer).
Keep track of the number bytes added through expansion of reference
links and limit the total to the size of the input document. Always
allow a minimum of 100KB. Unfortunately, cmark has no error handling,
so all we can do is to stop expanding reference links without returning
an error. This should never be an issue in practice though. The 100KB
minimum alone should cover all real-world cases.
* Fix issue with type-7 HTML blocks interrupting paragraphs
(see commonmark/commonmark.js).
* Treat `textarea` like `script`, `style`, `pre` (type 1 HTML block),
in accordance with spec change.
* Define whitespace per spec (Asherah Conor).
* Add `MAX_INDENT` for xml. Otherwise we can get quadratic
increase in size with deeply nested structures.
* Fix handling of empty strings when creating XML/HTML output
(Steffen Kieß).
* Commonmark renderer: always use fences for code.
This solves problems with adjacent code blocks being merged.
* Improve rendering of commonmark code spans with spaces.
* Cleaner approach to max digits for numeric entities.
This modifies unescaping in `houdini_html_u.c` rather than
the entity handling in `inlines.c`. Unlike the other,
this approach works also in e.g. link titles.
* Fix entity parser (and api test) to respect length limit on
numeric entities.
* Don't allow link destinations with unbalanced unescaped parentheses.
See commonmark/commonmark.js.
* `print_usage()`: Minor grammar fix, swap two words (Øyvind A. Holm).
* Don't call `memcpy` with `NULL` as first parameter.
This is illegal according to the C standard, sec. 7.1.4.
See <https://www.imperialviolet.org/2016/06/26/nonnull.html>.
* Add needed include in `blocks.c`.
* Fix unnecessary variable assignment.
* Skip UTF-8 BOM if present at beginning of buffer.
* Fix URL check in `is_autolink` (Nick Wellnhofer). In a recent commit,
the check was changed to `strcmp`, but we really have to use `strncmp`.
* Fix null pointer deref in `is_autolink` (Nick Wellnhofer).
Introduced by a recent commit. Found by OSS-Fuzz.
* Rearrange struct cmark_node (Nick Wellnhofer). Introduce multi-purpose
data/len members in struct cmark_node. This is mainly used to store
literal text for inlines, code and HTML blocks.
Move the content strbuf for blocks from `cmark_node` to `cmark_parser`.
When finalizing nodes that allow inlines (paragraphs and headings),
detach the strbuf and store the block content in the node's data/len
members. Free the block content after processing inlines.
Reduces size of struct `cmark_node` by 8 bytes.
* Improve packing of `struct cmark_list` (Nick Wellnhofer).
* Use C string instead of chunk in a number of contexts (Nick Wellnhofer).
The node struct never references memory of other nodes now.
Node accessors don't have to check for delayed creation of C strings,
so parsing and iterating all literals using the public API should
actually be faster than before. These changes also reduce the size
of `struct cmark_node`.
* Add casts for MSVC10 (from kivikakk in cmark-cfm).
* commonmark renderer: better escaping in smart mode. When
`CMARK_OPT_SMART` is enabled, we escape literal `-`, `.`, and quote
characters when needed to avoid their being "smartified."
* Add options field to `cmark_renderer`.
* commonmark.c - use `size_t` instead of `int`.
* Include `string.h` in `cmark-fuzz.c`.
* Fix (hash collisions for references) (Vicent Marti via cmark-gfm).
Reimplemented reference storage as follows:
1. New references are always inserted at the end of a linked list. This
is an O(1) operation, and does not check whether an existing (duplicate)
reference with the same label already exists in the document.
2. Upon the first call to `cmark_reference_lookup` (when it is expected
that no further references will be added to the reference map), the
linked list of references is written into a fixed-size array.
3. The fixed size array can then be efficiently sorted in-place in O(n
log n). This operation only happens once. We perform this sort in a
_stable_ manner to ensure that the earliest link reference in the
document always has preference, as the spec dictates. To accomplish
this, every reference is tagged with a generation number when initially
inserted in the linked list.
4. The sorted array is then compacted in O(n). Since it was sorted in a
stable way, the first reference for each label is preserved and the
duplicates are removed, matching the spec.
5. We can now simply perform a binary search for the current
`cmark_reference_lookup` query in O(log n). Any further lookup calls
will also be O(log n), since the sorted references table only needs to
be generated once.
The resulting implementation is notably simple (as it uses standard
library builtins `qsort` and `bsearch`), whilst performing better than
the fixed size hash table in documents that have a high number of
references and never becoming pathological regardless of the input.
* Comment out unused function `cmark_strbuf_cstr` in `buffer.h`.
* Re-add `--safe` command-line option as a no-op, for backwards
compatibility.
* Update to Unicode 13.0
* Generate and install cmake-config file (Reinhold Gschweicher).
Add full cmake support. The project can either be used with
`add_subdirectory` or be installed into the system (or some other
directory) and be found with `find_package(cmark)`. In both cases the
cmake target `cmark::cmark` and/or `cmark::cmark_static` is all that
is needed to be linked. Previously the `cmarkConfig.cmake` file
was generated, but not installed. As additional bonus of generation
by cmake we get a generated `cmake-config-version.cmake` file for
`find_package()` to search for the same major version.
The generated config file is position independent, allowing the
installed directory to be copied or moved and still work.
The following four files are generated and installed:
`lib/cmake/cmark/cmark-config.cmake`,
`lib/cmake/cmark/cmark-config-version.cmake`,
`lib/cmake/cmark/cmark-targets.cmake`,
`lib/cmake/cmark/cmark-targets-release.cmake`.
* Adjust the MinGW paths for MinGW64 (Daniil Baturin).
* Fix CMake generator expression checking for MSVC (Nick Wellnhofer).
* Fix `-Wconst-qual` warning (Saleem Abdulrasool). This enables building
with `/Zc:strictString` with MSVC as well.
* Improve and modernize cmake build (Saleem Abdulrasool).
+ Build: add exports targets for build tree usage.
+ Uuse target properties for include paths.
+ Remove the unnecessary execute permission on CMakeLists.txt.
+ Reduce property computation in CMake.
+ Use `CMAKE_INCLUDE_CURRENT_DIRECTORY`.
+ Improve man page installation.
+ Only include `GNUInstallDirs` once.
+ Replace `add_compile_definitions` with `add_compile_options`
since the former was introduced in 3.12.
+ Cleanup CMake.
+ Inline a variable.
+ Use `LINKER_LANGUAGE` property for C++ runtime.
+ Use CMake to control C standard.
+ Use the correct variable.
+ Loosen the compiler check
+ Hoist shared flags to top-level CMakeLists
+ Remove duplicated flags.
+ Use `add_compile_options` rather than modify `CMAKE_C_FLAGS`.
+ Hoist sanitizer flags to global state.
+ Hoist `-fvisibilty` flags to top-level.
+ Hoist the debug flag handling.
+ Hoist the profile flag handling.
+ Remove incorrect variable handling.
+ Remove unused CMake includes.
* Remove "-rdynamic" flag for static builds (Eric Pruitt).
* Fixed installation on other than Ubuntu GNU/Linux distributions
(Vitaly Zaitsev).
* Link executable with static or shared library (Nick Wellnhofer).
If `CMARK_STATIC` is on (default), link the executable with the static
library. This produces exactly the same result as compiling the library
sources again and linking with the object files.
If `CMARK_STATIC` is off, link the executable with the shared library.
This wasn't supported before and should be the preferred way to
package cmark on Linux distros.
Building only a shared library and a statically linked executable
isn't supported anymore but this doesn't seem useful.
* Reintroduce version check for MSVC /TP flag (Nick Wellnhofer).
The flag is only required for old MSVC versions.
* normalize.py: use `html.escape` instead of `cgi.escape`.
* Fix pathological_tests.py on Windows (Nick Wellnhofer).
When using multiprocessing on Windows, the main program must be
guarded with a `__name__` check.
* Remove useless `__name__` check in test scripts (Nick Wellnhofer).
* Add CIFuzz (Leo Neat).
* cmark.1 - Document --unsafe instead of --safe.
* cmark.1: remove docs for `--normalize` which no longer exists.
* Add lint target to Makefile.
* Add uninstall target to Makefile.
* Update benchmarks.
* Fix typo in documentation (Tim Gates).
* Increase timeout for pathological tests to avoid CI failure.
* Update the Racket wrapper with the safe -> unsafe flag change
Updated textproc/cmark 0.24.1 to 0.26.1
---------------------------------------
cmark 0.26.1
@jgm jgm released this Jul 16, 2016 . 18 commits to master since this release
* Removed unnecessary typedef that caused build failure on some platforms.
* Use $(MAKE) in Makefile instead of hardcoded make (#146, Tobias Kortkamp).
cmark 0.26.0
@jgm jgm released this Jul 15, 2016 . 23 commits to master since this release
* Implement spec changes for list items:
+ Empty list items cannot interrupt paragraphs.
+ Ordered lists cannot interrupt paragraphs unless they start with 1.
+ Removed "two blank lines break out of a list" feature.
* Fix sourcepos for blockquotes (#142).
* Fix sourcepos for atx headers (#141).
* Fix ATX headers and thematic breaks to allow tabs as well as spaces.
* Fix chunk_set_cstr with suffix of current string (#139, Nick Wellnhofer).
It's possible that cmark_chunk_set_cstr is called with a substring (suffix)
of the current string. Delay freeing of the chunk content to handle this
case correctly.
* Export targets on installation (Jonathan M?ller). This allows using them in
other cmake projects.
* Fix cmake warning about CMP0048 (Jonathan M?ller).
* commonmark renderer: Ensure we don't have a blank line before a code block
when it's the first thing in a list item.
* Change parsing of strong/emph in response to spec changes. process_emphasis
now gets better results in corner cases. The change is this: when
considering matches between an interior delimiter run (one that can open
and can close) and another delimiter run, we require that the sum of the
lengths of the two delimiter runs mod 3 is not 0.
* Ported Robin Stocker's changes to link parsing in jgm/CommonMark#101. This
uses a separate stack for brackets, instead of putting them on the
delimiter stack. This avoids the need for looking through the delimiter
stack for the next bracket.
* cmark_reference_lookup: Return NULL if reference is null string.
* Fix character type detection in commonmark.c (Nick Wellnhofer). Fixes test
failures on Windows and undefined behavior.
+ Implement cmark_isalpha.
+ Check for ASCII character before implicit cast to char.
+ Use internal ctype functions in commonmark.c.
* Better documentation of memory-freeing responsibilities. in cmark.h and its
man page (#124).
* Use library functions to insert nodes in emphasis/link processing.
Previously we did this manually, which introduces many places where errors
can creep in.
* Correctly handle list marker followed only by spaces. Previously when a
list marker was followed only by spaces, cmark expected the following
content to be indented by the same number of spaces. But in this case we
should treat the line just like a blank line and set list padding
accordingly.
* Fixed a number of issues relating to line wrapping.
+ Extend CMARK_OPT_NOBREAKS to all renderers and add --nobreaks.
+ Do not autowrap, regardless of width parameter, if CMARK_OPT_NOBREAKS
is set.
+ Fixed CMARK_OPT_HARDBREAKS for LaTeX and man renderers.
+ Ensure that no auto-wrapping occurs if CMARK_OPT_NOBREAKS is enabled,
or if output is CommonMark and CMARK_OPT_HARDBREAKS is enabled.
* Set stdin to binary mode on Windows (Nick Wellnhofer, #113). This fixes
EOLs when reading from stdin.
* Add library option to render softbreaks as spaces (Pavlo Kapyshin). Note
that the NOBREAKS option is HTML-only
* renderer: no_linebreaks instead of no_wrap. We generally want this option
to prohibit any breaking in things like headers (not just wraps, but
softbreaks).
* Coerce realurllen to int. This is an alternate solution for pull request #
132, which introduced a new warning on the comparison (Benedict Cohen).
* Remove unused variable link_text (Mathiew Duponchelle).
* Improved safety checks in buffer (Vicent Marti).
* Add new interface allowing specification of custom memory allocator for
nodes (Vicent Marti). Added cmark_node_new_with_mem,
cmark_parser_new_with_mem, cmark_mem to API.
* Reduce storage size for nodes by using bit flags instead of separate
booleans (Vicent Marti).
* config: Add SSIZE_T compat for Win32 (Vicent Marti).
* cmake: Global handler for OOM situations (Vicent Marti).
* Add tests for memory exhaustion (Vicent Marti).
* Document in man page and public header that one should use the same memory
allocator for every node in a tree.
* Fix ctypes in Python FFI calls (Nick Wellnhofer). This didn't cause
problems so far because all types are 32-bit on 32-bit systems and
arguments are passed in registers on x86-64. The wrong types could cause
crashes on other platforms, though.
* Remove spurious failures in roundtrip tests. In the commonmark writer we
separate lists, and lists and indented code, using a dummy HTML comment. So
in evaluating the round-trip tests, we now strip out these comments. We
also normalize HTML to avoid issues having to do with line breaks.
* Add 2016 to copyright (Kevin Burke).
* Added to_commonmark in test/cmark.py (for round-trip tests).
* spec_test.py - parameterize do_test with converter.
* spec_tests.py: exit code is now sum of failures and errors. This ensures
that a failing exit code will be given when there are errors, not just with
failures.
* Fixed round trip tests. Previously they actually ran cmark instead of the
round-trip version, since there was a bug in setting the ROUNDTRIP variable
(#131).
* Added new roundtrip_tests.py. This replaces the old use of simple shell
scripts. It is much faster, and more flexible. (We will be able to do
custom normalization and skip certain tests.)
* Fix tests under MinGW (Nick Wellnhofer).
* Fix leak in api_test (Mathieu Duponchelle).
* Makefile: have leakcheck stop on first error instead of going through all
the formats and options and probably getting the same output.
* Add regression tests (Nick Wellnhofer).
cmark 0.25.2
@jgm jgm released this Mar 26, 2016 . 114 commits to master since this release
* Open files in binary mode (#113, Nick Wellnhofer). Now that cmark supports
different line endings, files must be openend in binary mode on Windows.
* Reset partially_consumed_tab on every new line (#114, Nick Wellnhofer).
* Handle buffer split across a CRLF line ending (#117). Adds an internal
field to the parser struct to keep track of last_buffer_ended_with_cr.
Added test.
cmark 0.25.1
@jgm jgm released this Mar 25, 2016 . 122 commits to master since this release
* Release with no code changes. cmark version was mistakenly set to 0.25.1 in
the 0.25.0 release (#112), so this release just ensures that this will
cause no confusion later.
cmark 0.25.0
@jgm jgm released this Mar 25, 2016 . 124 commits to master since this release
* Fixed tabs in indentation (#101). This patch fixes S_advance_offset so that
it doesn't gobble a tab character when advancing less than the width of a
tab.
* Added partially_consumed_tab to parser. This keeps track of when we have
gotten partway through a tab when consuming initial indentation.
* Simplified add_line (only need parser parameter).
* Properly handle partially consumed tab. E.g. in
- foo
<TAB><TAB>bar
we should consume two spaces from the second tab, including two spaces
in the code block.
* Properly handle tabs with blockquotes and fenced blocks.
* Fixed handling of tabs in lists.
* Clarified logic in S_advance_offset.
* Use an assertion to check for in-range html_block_type. It's a programming
error if the type is out of range.
* Refactored S_processLines to make the logic easier to understand, and added
documentation (Mathieu Duponchelle).
* Removed unnecessary check for empty string_content.
* Factored out contains_inlines.
* Moved the cmake minimum version to top line of CMakeLists.txt (tinysun212).
* Fix ctype(3) usage on NetBSD (Kamil Rytarowski). We need to cast value
passed to isspace(3) to unsigned char to explicitly prevent possibly
undefined behavior.
* Compile in plain C mode with MSVC 12.0 or newer (Nick Wellnhofer). Under
MSVC, we used to compile in C++ mode to get some C99 features like mixing
declarations and code. With newer MSVC versions, it's possible to build in
plain C mode.
* Switched from "inline" to "CMARK_INLINE" (Nick Wellnhofer). Newer MSVC
versions support enough of C99 to be able to compile cmark in plain C mode.
Only the "inline" keyword is still unsupported. We have to use "__inline"
instead.
* Added include guards to config.h
* config.h.in - added compatibility snprintf, vsnprintf for MSVC.
* Replaced sprintf with snprintf (Marco Benelli).
* config.h: include stdio.h for _vscprintf etc.
* Include starg.h when needed in config.h.
* Removed an unnecessary C99-ism in buffer.c. This helps compiling on systems
like luarocks that don't have all the cmake configuration goodness (thanks
to carlmartus).
* Don't use variable length arrays (Nick Wellnhofer). They're not supported
by MSVC.
* Test with multiple MSVC versions under Appveyor (Nick Wellnhofer).
* Fix installation dir of man-pages on NetBSD (Kamil Rytarowski).
* Fixed typo in cmark.h comments (Chris Eidhof).
* Clarify in man page that cmark_node_free frees a node's children too.
* Fixed documentation of --width in man page.
* Require re2c >= 1.14.2 (#102).
* Generated scanners.c with more recent re2c.
(pkgsrc changes)
- Drop two patches accepted to upstream
Import cmark-0.24.1 as textproc/cmark cmark is the C reference implementation of CommonMark, a rationalized version of Markdown syntax with a spec. 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. Originally packages in pkgsrc-wip/cmark by Kamil Rytarowski