Tue Apr 9 06:04:13 2019 UTC ()
cmark: updated to 0.29.0

0.29.0:
Update spec to 0.29.
Make rendering safe by default. Adds CMARK_OPT_UNSAFE and make CMARK_OPT_SAFE a no-op (for API compatibility). The new default behavior is to suppress raw HTML and potentially dangerous links. The CMARK_OPT_UNSAFE option has to be set explicitly to prevent this. NOTE: This change will require modifications in bindings for cmark and in most libraries and programs that use cmark.
Add sourcepos info for inlines (Yuki Izumi).
Disallow more than 32 nested balanced parens in a link (Yuki Izumi).
Resolve link references before creating setext header. A setext header line after a link reference should not create a header, according to the spec.
commonmark renderer: improve escaping. URL-escape special characters when escape mode is URL, and not otherwise. Entity-escape control characters (< 0x20) in non-literal escape modes.
render: only emit actual newline when escape mode is LITERAL. For markdown content, e.g., in other contexts we want some kind of escaping, not a literal newline.
Update code span normalization to conform with spec change.
Allow empty <> link destination in reference link.
Remove leftover includes of memory.h.
A link destination can't start with < unless it is an angle-bracket link that also ends with >. (If your URL really starts with <, URL-escape it.)
Allow internal delimiter runs to match if both have lengths that are multiples of 3.
Include references.h in parser.h.
Fix [link](<foo\>).
Use hand-rolled scanner for thematic break. Keep track of the last position where a thematic break failed to match on a line, to avoid rescanning unnecessarily.
Rename ends_with_blank_line with S_ prefix.
Add CMARK_NODE__LAST_LINE_CHECKED flag. Use this to avoid unnecessary recursion in ends_with_blank_line.
In ends_with_blank_line, call S_set_last_line_blank to avoid unnecessary repetition. Once we settle whether a list item ends in a blank line, we don't need to revisit this in considering parent list items.
Disallow unescaped ( in parenthesized link title.
Copy line/col info straight from opener/closer (Ashe Connor). We can't rely on anything in subj since it's been modified while parsing the subject and could represent line info from a future line. This is simple and works.
render.c: reset last_breakable after cr.
Fix a typo in houdini_href_e.c (Felix Yan).
commonmark writer: use ~~~ fences if info string contains backtick. This is needed for round-trip tests.
Update scanners for new info string rules.
Add XSLT stylesheet to convert cmark XML back to Commonmark. Initial version of an XSLT stylesheet that converts the XML format produced by cmark -t xml back to Commonmark.
Check for whitespace before reference title.
Bump CMake to version 3 (Jonathan Müller).
Build: Remove deprecated call to add_compiler_export_flags() (Jonathan Müller). It is deprecated in CMake 3.0, the replacement is to set the CXX_VISIBILITY_PRESET (or in our case C_VISIBILITY_PRESET) and VISIBILITY_INLINES_HIDDEN properties of the target. We're already setting them by setting the CMake variables anyway, so the call can be removed.
Build: only attempt to install MSVC system libraries on Windows (Saleem Abdulrasool). Newer versions of CMake attempt to query the system for information about the VS 2017 installation. Unfortunately, this query fails on non-Windows systems when cross-compiling: cmake_host_system_information does not recognize <key> VS_15_DIR. CMake will not find these system libraries on non-Windows hosts anyways, and we were silencing the warnings, so simply omit the installation when cross-compiling to Windows.
Simplify code normalization, in line with spec change.
Implement code span spec changes. These affect both parsing and writing commonmark.
Add link parsing corner cases to regressions (Ashe Connor).
Add xml:space="preserve" in XML output when appropriate (Nguyễn Thái Ngọc Duy). (For text, code, code_block, html_inline and html_block tags.)
Removed meta from list of block tags. Added regression test.
entity_tests.py - omit noisy success output.
pathological_tests.py: make tests run faster. Commented out the (already ignored) "many references" test, which times out. Reduced the iterations for a couple other tests.
pathological_tests.py: added test for deeply nested lists.
Optimize S_find_first_nonspace. We were needlessly redoing things we'd already done. Now we skip the work if the first nonspace is greater than the current offset. This fixes pathological slowdown with deeply nested lists. For N = 3000, the time goes from over 17s to about 0.7s. Thanks to Martin Mitas for diagnosing the problem.
Allow spaces in link destination delimited with pointy brackets.
Adjust max length of decimal/numeric entities.
Fix inline raw HTML parsing. This fixes a recently added failing spec test case. Previously spaces were being allowed in unquoted attribute values; no we forbid them.
Don't allow list markers to be indented >= 4 spaces.
Check for empty buffer when rendering (Phil Turnbull). For empty documents, ->size is zero so renderer.buffer->ptr[renderer.buffer->size - 1] will cause an out-of-bounds read. Empty buffers always point to the global cmark_strbuf__initbuf buffer so we read cmark_strbuf__initbuf[-1].
Also run API tests with CMARK_SHARED=OFF (Nick Wellnhofer).
Rename roundtrip and entity tests (Nick Wellnhofer). Rename the tests to reflect that they use the library, not the executable.
Generate export header for static-only build.
Fuzz width parameter too (Phil Turnbull). Allow the width parameter to be generated too so we get better fuzz-coverage.
Don't discard empty fuzz test-cases (Phil Turnbull). We currently discard fuzz test-cases that are empty but empty inputs are valid markdown. This improves the fuzzing coverage slightly.
Fixed exit code for pathological tests.
Add allowed failures to pathological_tests.py. This allows us to include tests that we don't yet know how to pass.
Add timeout to pathological_tests.py. Tests must complete in 8 seconds or are errors.
Add more pathological tests.
Use pledge(2) on OpenBSD (Ashe Connor).
Update the Racket wrapper (Eli Barzilay).
Makefile: For afl target, don't build tests.


(adam)
diff -r1.6 -r1.7 pkgsrc/textproc/cmark/Makefile
diff -r1.4 -r1.5 pkgsrc/textproc/cmark/distinfo

cvs diff -r1.6 -r1.7 pkgsrc/textproc/cmark/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/cmark/Makefile 2018/01/18 17:11:38 1.6
+++ pkgsrc/textproc/cmark/Makefile 2019/04/09 06:04:13 1.7
@@ -1,30 +1,30 @@ @@ -1,30 +1,30 @@
1# $NetBSD: Makefile,v 1.6 2018/01/18 17:11:38 adam Exp $ 1# $NetBSD: Makefile,v 1.7 2019/04/09 06:04:13 adam Exp $
2 2
3DISTNAME= cmark-0.28.3 3DISTNAME= cmark-0.29.0
4CATEGORIES= textproc 4CATEGORIES= textproc
5MASTER_SITES= ${MASTER_SITE_GITHUB:=jgm/} 5MASTER_SITES= ${MASTER_SITE_GITHUB:=jgm/}
6 6
7MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= pkgsrc-users@NetBSD.org
8HOMEPAGE= https://github.com/commonmark/cmark 8HOMEPAGE= https://github.com/commonmark/cmark
9COMMENT= CommonMark parsing and rendering library and program in C 9COMMENT= CommonMark parsing and rendering library and program in C
10LICENSE= 2-clause-bsd 10LICENSE= 2-clause-bsd
11 11
12USE_CMAKE= yes 12USE_CMAKE= yes
13USE_LANGUAGES= c c++ 13USE_LANGUAGES= c c++
14USE_TOOLS+= pkg-config 14USE_TOOLS+= pkg-config
15CONFIGURE_DIRS= build 15CONFIGURE_DIRS= build
16CMAKE_ARG_PATH= ${WRKSRC} 16CMAKE_ARG_PATH= ${WRKSRC}
17PKGCONFIG_OVERRIDE+= src/libcmark.pc.in 17PKGCONFIG_OVERRIDE+= src/libcmark.pc.in
18 18
19PYTHON_FOR_BUILD_ONLY= yes 19PYTHON_FOR_BUILD_ONLY= yes
20 20
21PYTHON_VERSIONS_INCOMPATIBLE= 27 21PYTHON_VERSIONS_INCOMPATIBLE= 27
22 22
23TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/build/src 23TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/build/src
24TEST_TARGET= test 24TEST_TARGET= test
25 25
26post-extract: 26post-extract:
27 ${RUN} mkdir -p ${WRKSRC}/build 27 ${MKDIR} ${WRKSRC}/build
28 28
29.include "../../lang/python/tool.mk" 29.include "../../lang/python/tool.mk"
30.include "../../mk/bsd.pkg.mk" 30.include "../../mk/bsd.pkg.mk"

cvs diff -r1.4 -r1.5 pkgsrc/textproc/cmark/distinfo (expand / switch to unified diff)

--- pkgsrc/textproc/cmark/distinfo 2018/01/18 17:11:38 1.4
+++ pkgsrc/textproc/cmark/distinfo 2019/04/09 06:04:13 1.5
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.4 2018/01/18 17:11:38 adam Exp $ 1$NetBSD: distinfo,v 1.5 2019/04/09 06:04:13 adam Exp $
2 2
3SHA1 (cmark-0.28.3.tar.gz) = b133cae62bdb0a97409a4d6bd1155057f8f3079b 3SHA1 (cmark-0.29.0.tar.gz) = d294240c6f889beb14936f75f8183a2bc19a1ab8
4RMD160 (cmark-0.28.3.tar.gz) = 46f2cf107eee4d2893f7845106b62e1a60b32298 4RMD160 (cmark-0.29.0.tar.gz) = 1f6feada790727a924352edfefe80f83fc1be162
5SHA512 (cmark-0.28.3.tar.gz) = 409105a3228a8ae22ba6acf95cd99bc9a2c20f8603aa0e803a33172eb6ef53f80f8f0262d2258b77f9fd6e1f2e9017a6c906b88f761e053c09ef88c9ffab7d29 5SHA512 (cmark-0.29.0.tar.gz) = 06eb110cfd90c9e980c022b7588e28864d15a4da5d07d61ad4b27c6de47367492b9e58e9434e62b07517aa6dc484f17af13916808be3188f38c37d20cbf33112
6Size (cmark-0.28.3.tar.gz) = 229391 bytes 6Size (cmark-0.29.0.tar.gz) = 234545 bytes