./textproc/cmark, CommonMark parsing and rendering library and program in C

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 0.31.1, Package name: cmark-0.31.1, Maintainer: pkgsrc-users

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.


Required to build:
[lang/python310]

Master sites:

Filesize: 257.979 KB

Version history: (Expand)


CVS history: (Expand)


   2024-08-05 11:22:23 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
cmark: updated to 0.31.1

0.31.1

* Flag root node as open in `cmark_parser_new_with_mem_into_root`

* Remove `source`, add `search` to list of block tags
  (a spec 0.31 change we forgot in last release).

* Accept lowercase inline HTML declarations (Michael Howell).

* Remove unused functions (Nick Wellnhofer).

* utf8:

  + Fix encoding of U+FFFE and U+FFFF
  + Rework case folding (Nick Wellnhofer).  Using a table and binary
    search instead of a generated switch statement significantly
    reduces the size of the compiled code.

* houdini:

  + Rename `houdini_escape_html0` -> `houdini_escape_html`
  + Rework HTML entity table (Nick Wellnhofer).
    The new layout saves about 20 KB and removes 50 KB of relocation
    entries from the shared library, also speeding up loading.

* cmake:

  + Tell cmake to set `rpath` so the installed `cmark` can find
    `libcmark.so` (Michael Witten).
  + Remove unnecessary enabling of target property: MACOSX_RPATH
    (Michael Witten).
  + Fix build type checks (Nick Wellnhofer). Make the libFuzzer
    target use the Asan build type again.

* Makefile:

  + Fix `libFuzzer` target (Nick Wellnhofer).
  + Use `ctest` and `--output-on-failure` in `test` target.
  + `make debug` should build a shared library (Nick Wellnhofer).
    The full test suite is only available to a shared library build.

* wrappers:

  + Fix memory leak in Ruby wrapper (Nick Wellnhofer).
    Free the string returned from `cmark_markdown_to_html`.
    Fix `cmark_markdown_to_html` argument types.
  + Fix memory leak in Python wrapper (Nick Wellnhofer).
    Free the string returned from cmark_markdown_to_html.
    Fix cmark_markdown_to_html argument types.
  + Convert to and from UTF-8 under Python 2.
  + Add PHP wraper (Vinicius Dias).

* ci:

  + Test with ASan and rework CI matrix (Nick Wellnhofer).
  + Remove the valgrind leakcheck test. This should be covered now
    by testing with LeakSanitizer on static builds, including tests
    like spectest_executable. The full test suite is only available
    to shared library builds which have to run without leak checks
    for now.
  + Separate cflags from cc (Nick Wellnhofer).
  + Make CMake matrix options work (Nick Wellnhofer).
    CMAKE_OPTIONS had no effect, leading to the shared library not being
    tested. Invoke cmake directly, so we don't have to deal with the mess
    in Makefile.
  + Do debug build so that assertions will run
  + Use `-gdwarf-4` with clang for compatibility with valgrind

* test:

  + Fix memory leaks in cmark.py (Nick Wellnhofer).
    Free results of libcmark API function calls.
  + Fix memory leaks in api_test (Nick Wellnhofer).
  + Simplify test execution environment handling (Saleem Abdulrasool).
    Use generator expressions to compute the new path and avoid
    translations. This reduces complexity in the build and allows for a
    different build layout.

* fuzz: Test more parser entry points (Nick Wellnhofer).

* Remove superfluous definitions from scanners.re.

* re2c: Disable UTF-8 (Nick Wellnhofer). The regexes don't require UTF-8
  features and work in ASCII mode as well. Disabling UTF-8 reduces the
  size of the code generated by re2c.
   2024-01-30 21:00:14 by Adam Ciarcinski | Files touched by this commit (5) | Package updated
Log message:
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
   2023-08-14 07:25:36 by Thomas Klausner | Files touched by this commit (1247)
Log message:
*: recursive bump for Python 3.11 as new default
   2023-01-24 09:27:49 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
cmark: updated to 0.30.3

0.30.3

* Fix quadratic complexity bug with repeated `![[]()`.
  Resolves CVE-2023-22486. Add new pathological test.

* Allow declarations with no space, as per spec.

* Set `enumi*` counter correctly in LaTeX output.

* Allow `<!DOCTYPE` to be case-insensitive. (This conforms to the
  existing spec.)

* Fixed HTML comment scanning. Need to handle this case: `<!--> and -->`.
  Since the scanner finds the longest match, we had to
  move some of the logic outside of the scanner.

* Fix quadratic parsing issue with repeated `<!--` (this was not
  introduced by the previous fix, and not in a released version of cmark).
  Resolves CVE-2023-22484. Add new pathological test.

* Update HTML comment scanner to accord with commonmark/commonmark-spec#713.

* Pathological tests: half the number of repetitions, and the timeout.
  This reduces the time needed for the pathological tests.

* Shrink `struct cmark_node`. The `internal_offset` member is
  only used for headings and can be moved to `struct cmark_heading`.
  This reduces the size of `struct cmark_node` from 112 to 104 bytes on
  64-bit systems.

* Add `-Wstrict-prototypes` and fix offending functions.

* Fix quadratic behavior involving `get_containing_block`.
  Instead of searching for the containing block, update the tight list
  status when entering a child of a list item or exiting a list.

* Fix `pathological_tests.py`:
  - Use a multiprocessing.Queue to actually get results from spawned
    tests processes.
  - Fix the `allowed_failures` test.
  - Truncate actual output when printed.
  - Prepare for testing pathological behavior of the Commonmark renderer.

* Fix source position bug with backticks (kyle).
   2021-11-29 11:44:16 by Dan Cirnat | Files touched by this commit (3)
Log message:
cmark: Fix building dependencies with strict function prototypes
   2021-10-26 13:23:42 by Nia Alarie | Files touched by this commit (1161)
Log message:
textproc: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

Unfetchable distfiles (fetched conditionally?):
./textproc/convertlit/distinfo clit18src.zip
   2021-10-09 21:20:08 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
cmark: updated to 0.30.2

0.30.2

* Fix parsing of emphasis before links.
  Fixes a regression introduced with commit ed0a4bf.

* Update to Unicode 14.0 (data-man).

* Add `~` to safe href character set.

* Update CMakeLists.txt.  Bump the minimum required
  CMake to 3.7. Imperatively define output name for static library.

* Fix install paths in libcmark.pc.
  `CMAKE_INSTALL_<dir>` can be relative or absolute path, so it is wrong to
  prefix CMAKE_INSTALL_PREFIX because if CMAKE_INSTALL_<dir> is set to an
  absolute path it will result in a malformed path with two absolute paths
  joined together.  Instead, use `CMAKE_INSTALL_FULL_<dir>` from
  GNUInstallDirs.
   2021-10-07 17:02:49 by Nia Alarie | Files touched by this commit (1162)
Log message:
textproc: Remove SHA1 hashes for distfiles