Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cmark for openSUSE:Factory checked in at 2021-10-08 22:05:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cmark (Old) and /work/SRC/openSUSE:Factory/.cmark.new.2443 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cmark" Fri Oct 8 22:05:04 2021 rev:12 rq:924170 version:0.30.2 Changes: -------- --- /work/SRC/openSUSE:Factory/cmark/cmark.changes 2021-06-21 20:36:08.114658166 +0200 +++ /work/SRC/openSUSE:Factory/.cmark.new.2443/cmark.changes 2021-10-08 22:05:30.988606339 +0200 @@ -1,0 +2,41 @@ +Fri Oct 8 08:59:08 UTC 2021 - Ond??ej S??kup <mimi...@gmail.com> + +- update to 0.30.2 + * Fix parsing of emphasis before links (#424, Nick Wellnhofer). + Fixes a regression introduced with commit ed0a4bf. + * Update to Unicode 14.0 (data-man). + * Add `~` to safe href character set (#394, frogtile). + * Update CMakeLists.txt (Saleem Abdulrasool). Bump the minimum required + CMake to 3.7. Imperatively define output name for static library. + * Fix install paths in libcmark.pc (Sebasti??n Mancilla). + `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. + * Properly indent block-level contents of list items in man (#258). + 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 (#389, 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 (#388, 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 (#384, 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). + +------------------------------------------------------------------- Old: ---- cmark-0.30.0.tar.gz New: ---- cmark-0.30.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cmark.spec ++++++ --- /var/tmp/diff_new_pack.J4x5zA/_old 2021-10-08 22:05:31.444607089 +0200 +++ /var/tmp/diff_new_pack.J4x5zA/_new 2021-10-08 22:05:31.448607096 +0200 @@ -16,16 +16,16 @@ # -%define libname libcmark0_30_0 +%define libname libcmark0_30_2 Name: cmark -Version: 0.30.0 +Version: 0.30.2 Release: 0 Summary: CommonMark parsing and rendering library and program in C License: BSD-2-Clause AND MIT AND CC-BY-SA-4.0 Group: Productivity/Text/Utilities URL: https://github.com/jgm/cmark Source: https://github.com/jgm/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: cmake >= 3.0.2 +BuildRequires: cmake >= 3.7 BuildRequires: gcc-c++ BuildRequires: pkgconfig ++++++ cmark-0.30.0.tar.gz -> cmark-0.30.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/CMakeLists.txt new/cmark-0.30.2/CMakeLists.txt --- old/cmark-0.30.0/CMakeLists.txt 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/CMakeLists.txt 2021-09-24 17:56:14.000000000 +0200 @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.0) -project(cmark VERSION 0.30.0) +cmake_minimum_required(VERSION 3.7) +project(cmark VERSION 0.30.2) include("FindAsan.cmake") include(GNUInstallDirs) @@ -28,33 +28,34 @@ SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) endif() -# Compiler flags -if(MSVC) - # Force to always compile with W4 - add_compile_options($<$<COMPILE_LANGUAGE:C>:/W4>) - add_compile_options($<$<COMPILE_LANGUAGE:C>:/wd4706>) - # Compile as C++ under MSVC older than 12.0 - if(MSVC_VERSION LESS 1800) - add_compile_options($<$<COMPILE_LANGUAGE:C>:/TP>) - endif() - add_compile_options($<$<COMPILE_LANGUAGE:C>:/D_CRT_SECURE_NO_WARNINGS>) -elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES Clang) - add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wall>) - add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wextra>) - add_compile_options($<$<COMPILE_LANGUAGE:C>:-pedantic>) -endif() - # Check integrity of node structure when compiled as debug add_compile_options($<$<CONFIG:Debug>:-DCMARK_DEBUG_NODES>) -add_compile_options($<$<AND:$<CONFIG:PROFILE>,$<COMPILE_LANGUAGE:C>>:-pg>) - -if(CMAKE_BUILD_TYPE STREQUAL Ubsan) - add_compile_options($<$<COMPILE_LANGUAGE:C>:-fsanitize=undefined>) -endif() -if(CMARK_LIB_FUZZER) - add_compile_options($<$<COMPILE_LANGUAGE:C>:-fsanitize-coverage=trace-pc-guard>) -endif() +# In order to maintain compatibility with older platforms which may not have a +# recent version of CMake (i.e. are running CMake <3.3), we cannot simply use +# the `add_compile_options` with a generator expression. This uses the +# `target_compile_options` with `PRIVATE` to add the flags only to the targets +# so that CMark may be used in projects with non-C languages. +function(cmark_add_compile_options target) + if(MSVC) + target_compile_options(${target} PRIVATE /W4 /wd4706) + if(MSVC_VERSION LESS 1800) + target_compile_options(${target} PRIVATE /TP) + endif() + target_compile_definitions(${target} PRIVATE _CRT_SECURE_NO_WARNINGS) + else() + target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic) + endif() + if(CMAKE_BUILD_TYPE MATCHES profile) + target_compile_options(${target} PRIVATE -pg) + endif() + if(CMAKE_BUILD_TYPE MATCHES ubsan) + target_compile_options(${target} PRIVATE -fsanitize=undefined) + endif() + if(CMARK_LIB_FUZZER) + target_compile_options(${target} PRIVATE -fsanitize-coverage=trace-pc-guard) + endif() +endfunction() add_subdirectory(src) if(CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/Makefile new/cmark-0.30.2/Makefile --- old/cmark-0.30.0/Makefile 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/Makefile 2021-09-24 17:56:14.000000000 +0200 @@ -17,7 +17,7 @@ CMARK_FUZZ=$(BUILDDIR)/src/cmark-fuzz PROG?=$(CMARK) VERSION?=$(SPECVERSION) -RELEASE?=CommonMark-$(VERSION) +RELEASE?=cmark-$(VERSION) INSTALL_PREFIX?=/usr/local CLANG_CHECK?=clang-check CLANG_FORMAT=clang-format -style llvm -sort-includes=0 -i diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/api_test/CMakeLists.txt new/cmark-0.30.2/api_test/CMakeLists.txt --- old/cmark-0.30.0/api_test/CMakeLists.txt 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/api_test/CMakeLists.txt 2021-09-24 17:56:14.000000000 +0200 @@ -4,6 +4,7 @@ harness.h main.c ) +cmark_add_compile_options(api_test) if(CMARK_SHARED) target_link_libraries(api_test cmark) else() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/api_test/main.c new/cmark-0.30.2/api_test/main.c --- old/cmark-0.30.0/api_test/main.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/api_test/main.c 2021-09-24 17:56:14.000000000 +0200 @@ -178,7 +178,7 @@ "set_literal suffix"); char *rendered_html = cmark_render_html(doc, - CMARK_OPT_DEFAULT | CMARK_OPT_UNSAFE); + CMARK_OPT_DEFAULT | CMARK_OPT_UNSAFE); static const char expected_html[] = "<h3>Header</h3>\n" "<ol start=\"3\">\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/changelog.txt new/cmark-0.30.2/changelog.txt --- old/cmark-0.30.0/changelog.txt 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/changelog.txt 2021-09-24 17:56:14.000000000 +0200 @@ -1,3 +1,49 @@ +[0.30.2] + + * Fix parsing of emphasis before links (#424, Nick Wellnhofer). + Fixes a regression introduced with commit ed0a4bf. + + * Update to Unicode 14.0 (data-man). + + * Add `~` to safe href character set (#394, frogtile). + + * Update CMakeLists.txt (Saleem Abdulrasool). Bump the minimum required + CMake to 3.7. Imperatively define output name for static library. + + * Fix install paths in libcmark.pc (Sebasti??n Mancilla). + `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. + +[0.30.1] + + * Properly indent block-level contents of list items in man (#258). + 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 (#389, 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 (#388, 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 (#384, 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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/data/CaseFolding.txt new/cmark-0.30.2/data/CaseFolding.txt --- old/cmark-0.30.0/data/CaseFolding.txt 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/data/CaseFolding.txt 2021-09-24 17:56:14.000000000 +0200 @@ -1,6 +1,6 @@ -# CaseFolding-13.0.0.txt -# Date: 2019-09-08, 23:30:59 GMT -# ?? 2019 Unicode??, Inc. +# CaseFolding-14.0.0.txt +# Date: 2021-03-08, 19:35:41 GMT +# ?? 2021 Unicode??, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see http://www.unicode.org/terms_of_use.html # @@ -1050,6 +1050,7 @@ 2C2C; C; 2C5C; # GLAGOLITIC CAPITAL LETTER SHTAPIC 2C2D; C; 2C5D; # GLAGOLITIC CAPITAL LETTER TROKUTASTI A 2C2E; C; 2C5E; # GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE +2C2F; C; 2C5F; # GLAGOLITIC CAPITAL LETTER CAUDATE CHRIVI 2C60; C; 2C61; # LATIN CAPITAL LETTER L WITH DOUBLE BAR 2C62; C; 026B; # LATIN CAPITAL LETTER L WITH MIDDLE TILDE 2C63; C; 1D7D; # LATIN CAPITAL LETTER P WITH STROKE @@ -1230,12 +1231,16 @@ A7BA; C; A7BB; # LATIN CAPITAL LETTER GLOTTAL A A7BC; C; A7BD; # LATIN CAPITAL LETTER GLOTTAL I A7BE; C; A7BF; # LATIN CAPITAL LETTER GLOTTAL U +A7C0; C; A7C1; # LATIN CAPITAL LETTER OLD POLISH O A7C2; C; A7C3; # LATIN CAPITAL LETTER ANGLICANA W A7C4; C; A794; # LATIN CAPITAL LETTER C WITH PALATAL HOOK A7C5; C; 0282; # LATIN CAPITAL LETTER S WITH HOOK A7C6; C; 1D8E; # LATIN CAPITAL LETTER Z WITH PALATAL HOOK A7C7; C; A7C8; # LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY A7C9; C; A7CA; # LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY +A7D0; C; A7D1; # LATIN CAPITAL LETTER CLOSED INSULAR G +A7D6; C; A7D7; # LATIN CAPITAL LETTER MIDDLE SCOTS S +A7D8; C; A7D9; # LATIN CAPITAL LETTER SIGMOID S A7F5; C; A7F6; # LATIN CAPITAL LETTER REVERSED HALF H AB70; C; 13A0; # CHEROKEE SMALL LETTER A AB71; C; 13A1; # CHEROKEE SMALL LETTER E @@ -1431,6 +1436,41 @@ 104D1; C; 104F9; # OSAGE CAPITAL LETTER GHA 104D2; C; 104FA; # OSAGE CAPITAL LETTER ZA 104D3; C; 104FB; # OSAGE CAPITAL LETTER ZHA +10570; C; 10597; # VITHKUQI CAPITAL LETTER A +10571; C; 10598; # VITHKUQI CAPITAL LETTER BBE +10572; C; 10599; # VITHKUQI CAPITAL LETTER BE +10573; C; 1059A; # VITHKUQI CAPITAL LETTER CE +10574; C; 1059B; # VITHKUQI CAPITAL LETTER CHE +10575; C; 1059C; # VITHKUQI CAPITAL LETTER DE +10576; C; 1059D; # VITHKUQI CAPITAL LETTER DHE +10577; C; 1059E; # VITHKUQI CAPITAL LETTER EI +10578; C; 1059F; # VITHKUQI CAPITAL LETTER E +10579; C; 105A0; # VITHKUQI CAPITAL LETTER FE +1057A; C; 105A1; # VITHKUQI CAPITAL LETTER GA +1057C; C; 105A3; # VITHKUQI CAPITAL LETTER HA +1057D; C; 105A4; # VITHKUQI CAPITAL LETTER HHA +1057E; C; 105A5; # VITHKUQI CAPITAL LETTER I +1057F; C; 105A6; # VITHKUQI CAPITAL LETTER IJE +10580; C; 105A7; # VITHKUQI CAPITAL LETTER JE +10581; C; 105A8; # VITHKUQI CAPITAL LETTER KA +10582; C; 105A9; # VITHKUQI CAPITAL LETTER LA +10583; C; 105AA; # VITHKUQI CAPITAL LETTER LLA +10584; C; 105AB; # VITHKUQI CAPITAL LETTER ME +10585; C; 105AC; # VITHKUQI CAPITAL LETTER NE +10586; C; 105AD; # VITHKUQI CAPITAL LETTER NJE +10587; C; 105AE; # VITHKUQI CAPITAL LETTER O +10588; C; 105AF; # VITHKUQI CAPITAL LETTER PE +10589; C; 105B0; # VITHKUQI CAPITAL LETTER QA +1058A; C; 105B1; # VITHKUQI CAPITAL LETTER RE +1058C; C; 105B3; # VITHKUQI CAPITAL LETTER SE +1058D; C; 105B4; # VITHKUQI CAPITAL LETTER SHE +1058E; C; 105B5; # VITHKUQI CAPITAL LETTER TE +1058F; C; 105B6; # VITHKUQI CAPITAL LETTER THE +10590; C; 105B7; # VITHKUQI CAPITAL LETTER U +10591; C; 105B8; # VITHKUQI CAPITAL LETTER VE +10592; C; 105B9; # VITHKUQI CAPITAL LETTER XE +10594; C; 105BB; # VITHKUQI CAPITAL LETTER Y +10595; C; 105BC; # VITHKUQI CAPITAL LETTER ZE 10C80; C; 10CC0; # OLD HUNGARIAN CAPITAL LETTER A 10C81; C; 10CC1; # OLD HUNGARIAN CAPITAL LETTER AA 10C82; C; 10CC2; # OLD HUNGARIAN CAPITAL LETTER EB diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/man/make_man_page.py new/cmark-0.30.2/man/make_man_page.py --- old/cmark-0.30.0/man/make_man_page.py 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/man/make_man_page.py 2021-09-24 17:56:14.000000000 +0200 @@ -2,8 +2,6 @@ # Creates a man page from a C file. -# first argument if present is path to cmark dynamic library - # Comments beginning with `/**` are treated as Groff man, except that # 'this' is converted to \fIthis\f[], and ''this'' to \fBthis\f[]. @@ -20,10 +18,12 @@ sysname = platform.system() +curdir = os.getcwd() + if sysname == 'Darwin': - cmark = CDLL("build/src/libcmark.dylib") + cmark = CDLL(curdir + "/build/src/libcmark.dylib") else: - cmark = CDLL("build/src/libcmark.so") + cmark = CDLL(curdir + "/build/src/libcmark.so") parse_document = cmark.cmark_parse_document parse_document.restype = c_void_p @@ -33,6 +33,10 @@ render_man.restype = c_char_p render_man.argtypes = [c_void_p, c_long, c_long] +cmark_version_string = cmark.cmark_version_string +cmark_version_string.restype = c_char_p +cmark_version_string.argtypes = [] + def md2man(text): if sys.version_info >= (3,0): textbytes = text.encode('utf-8') @@ -129,5 +133,5 @@ chunk = [] mdlines.append('\n') -sys.stdout.write('.TH ' + os.path.basename(sourcefile).replace('.h','') + ' 3 "' + date.today().strftime('%B %d, %Y') + '" "LOCAL" "Library Functions Manual"\n') +sys.stdout.write('.TH ' + os.path.basename(sourcefile).replace('.h','') + ' 3 "' + date.today().strftime('%B %d, %Y') + '" "cmark ' + cmark_version_string().decode('utf-8') + '" "Library Functions Manual"\n') sys.stdout.write(''.join(mdlines)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/man/man3/cmark.3 new/cmark-0.30.2/man/man3/cmark.3 --- old/cmark-0.30.0/man/man3/cmark.3 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/man/man3/cmark.3 2021-09-24 17:56:14.000000000 +0200 @@ -1,4 +1,4 @@ -.TH cmark 3 "February 09, 2020" "LOCAL" "Library Functions Manual" +.TH cmark 3 "September 24, 2021" "cmark 0.30.2" "Library Functions Manual" .SH NAME .PP @@ -57,7 +57,7 @@ CMARK_NODE_IMAGE, CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT, - CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE, + CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE } cmark_node_type; .RE \f[] @@ -585,10 +585,10 @@ cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT); FILE *fp = fopen("myfile.md", "rb"); while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { - cmark_parser_feed(parser, buffer, bytes); - if (bytes < sizeof(buffer)) { - break; - } + cmark_parser_feed(parser, buffer, bytes); + if (bytes < sizeof(buffer)) { + break; + } } document = cmark_parser_finish(parser); cmark_parser_free(parser); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/CMakeLists.txt new/cmark-0.30.2/src/CMakeLists.txt --- old/cmark-0.30.0/src/CMakeLists.txt 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/CMakeLists.txt 2021-09-24 17:56:14.000000000 +0200 @@ -53,6 +53,7 @@ include (GenerateExportHeader) add_executable(${PROGRAM} ${PROGRAM_SOURCES}) +cmark_add_compile_options(${PROGRAM}) set_target_properties(${PROGRAM} PROPERTIES OUTPUT_NAME "cmark") @@ -71,6 +72,7 @@ if (CMARK_SHARED) add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES}) + cmark_add_compile_options(${LIBRARY}) set_target_properties(${LIBRARY} PROPERTIES MACOSX_RPATH TRUE OUTPUT_NAME "cmark" @@ -93,11 +95,18 @@ if (CMARK_STATIC) add_library(${STATICLIBRARY} STATIC ${LIBRARY_SOURCES}) + cmark_add_compile_options(${STATICLIBRARY}) set_target_properties(${STATICLIBRARY} PROPERTIES COMPILE_FLAGS -DCMARK_STATIC_DEFINE - OUTPUT_NAME "cmark$<$<BOOL:${MSVC}>:_static>" POSITION_INDEPENDENT_CODE ON VERSION ${PROJECT_VERSION}) + if(MSVC) + set_target_properties(${STATICLIBRARY} PROPERTIES + OUTPUT_NAME cmark_static) + else() + set_target_properties(${STATICLIBRARY} PROPERTIES + OUTPUT_NAME cmark) + endif() target_include_directories(${STATICLIBRARY} INTERFACE $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> @@ -188,6 +197,7 @@ if(CMARK_LIB_FUZZER) add_executable(cmark-fuzz ../test/cmark-fuzz.c ${LIBRARY_SOURCES}) + cmark_add_compile_options(cmark-fuzz) target_link_libraries(cmark-fuzz "${CMAKE_LIB_FUZZER_PATH}") # cmark is written in C but the libFuzzer runtime is written in C++ which diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/blocks.c new/cmark-0.30.2/src/blocks.c --- old/cmark-0.30.0/src/blocks.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/blocks.c 2021-09-24 17:56:14.000000000 +0200 @@ -238,7 +238,7 @@ cmark_chunk chunk = {node_content->ptr, node_content->size}; while (chunk.len && chunk.data[0] == '[' && (pos = cmark_parse_reference_inline(parser->mem, &chunk, - parser->refmap))) { + parser->refmap))) { chunk.data += pos; chunk.len -= pos; @@ -1014,7 +1014,7 @@ } else if (!indented && ((matched = scan_html_block_start( input, parser->first_nonspace)) || (cont_type != CMARK_NODE_PARAGRAPH && - !maybe_lazy && + !maybe_lazy && (matched = scan_html_block_start_7( input, parser->first_nonspace))))) { *container = add_child(parser, *container, CMARK_NODE_HTML_BLOCK, @@ -1037,14 +1037,14 @@ } } else if (!indented && !(cont_type == CMARK_NODE_PARAGRAPH && !all_matched) && - (parser->thematic_break_kill_pos <= parser->first_nonspace) && - (matched = S_scan_thematic_break(parser, input, parser->first_nonspace))) { + (parser->thematic_break_kill_pos <= parser->first_nonspace) && + S_scan_thematic_break(parser, input, parser->first_nonspace)) { // it's only now that we know the line is not part of a setext heading: *container = add_child(parser, *container, CMARK_NODE_THEMATIC_BREAK, parser->first_nonspace + 1); S_advance_offset(parser, input, input->len - 1 - parser->offset, false); } else if ((!indented || cont_type == CMARK_NODE_LIST) && - parser->indent < 4 && + parser->indent < 4 && (matched = parse_list_marker( parser->mem, input, parser->first_nonspace, (*container)->type == CMARK_NODE_PARAGRAPH, &data))) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/case_fold_switch.inc new/cmark-0.30.2/src/case_fold_switch.inc --- old/cmark-0.30.0/src/case_fold_switch.inc 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/case_fold_switch.inc 2021-09-24 17:56:14.000000000 +0200 @@ -2985,6 +2985,9 @@ case 0x2C2E: bufpush(0x2C5E); break; + case 0x2C2F: + bufpush(0x2C5F); + break; case 0x2C60: bufpush(0x2C61); break; @@ -3525,6 +3528,9 @@ case 0xA7BE: bufpush(0xA7BF); break; + case 0xA7C0: + bufpush(0xA7C1); + break; case 0xA7C2: bufpush(0xA7C3); break; @@ -3543,6 +3549,15 @@ case 0xA7C9: bufpush(0xA7CA); break; + case 0xA7D0: + bufpush(0xA7D1); + break; + case 0xA7D6: + bufpush(0xA7D7); + break; + case 0xA7D8: + bufpush(0xA7D9); + break; case 0xA7F5: bufpush(0xA7F6); break; @@ -4142,6 +4157,111 @@ case 0x104D3: bufpush(0x104FB); break; + case 0x10570: + bufpush(0x10597); + break; + case 0x10571: + bufpush(0x10598); + break; + case 0x10572: + bufpush(0x10599); + break; + case 0x10573: + bufpush(0x1059A); + break; + case 0x10574: + bufpush(0x1059B); + break; + case 0x10575: + bufpush(0x1059C); + break; + case 0x10576: + bufpush(0x1059D); + break; + case 0x10577: + bufpush(0x1059E); + break; + case 0x10578: + bufpush(0x1059F); + break; + case 0x10579: + bufpush(0x105A0); + break; + case 0x1057A: + bufpush(0x105A1); + break; + case 0x1057C: + bufpush(0x105A3); + break; + case 0x1057D: + bufpush(0x105A4); + break; + case 0x1057E: + bufpush(0x105A5); + break; + case 0x1057F: + bufpush(0x105A6); + break; + case 0x10580: + bufpush(0x105A7); + break; + case 0x10581: + bufpush(0x105A8); + break; + case 0x10582: + bufpush(0x105A9); + break; + case 0x10583: + bufpush(0x105AA); + break; + case 0x10584: + bufpush(0x105AB); + break; + case 0x10585: + bufpush(0x105AC); + break; + case 0x10586: + bufpush(0x105AD); + break; + case 0x10587: + bufpush(0x105AE); + break; + case 0x10588: + bufpush(0x105AF); + break; + case 0x10589: + bufpush(0x105B0); + break; + case 0x1058A: + bufpush(0x105B1); + break; + case 0x1058C: + bufpush(0x105B3); + break; + case 0x1058D: + bufpush(0x105B4); + break; + case 0x1058E: + bufpush(0x105B5); + break; + case 0x1058F: + bufpush(0x105B6); + break; + case 0x10590: + bufpush(0x105B7); + break; + case 0x10591: + bufpush(0x105B8); + break; + case 0x10592: + bufpush(0x105B9); + break; + case 0x10594: + bufpush(0x105BB); + break; + case 0x10595: + bufpush(0x105BC); + break; case 0x10C80: bufpush(0x10CC0); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/cmark.h new/cmark-0.30.2/src/cmark.h --- old/cmark-0.30.0/src/cmark.h 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/cmark.h 2021-09-24 17:56:14.000000000 +0200 @@ -62,7 +62,7 @@ CMARK_NODE_IMAGE, CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT, - CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE, + CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE } cmark_node_type; /* For backwards compatibility: */ @@ -452,10 +452,10 @@ * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT); * FILE *fp = fopen("myfile.md", "rb"); * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { - * cmark_parser_feed(parser, buffer, bytes); - * if (bytes < sizeof(buffer)) { - * break; - * } + * cmark_parser_feed(parser, buffer, bytes); + * if (bytes < sizeof(buffer)) { + * break; + * } * } * document = cmark_parser_finish(parser); * cmark_parser_free(parser); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/commonmark.c new/cmark-0.30.2/src/commonmark.c --- old/cmark-0.30.0/src/commonmark.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/commonmark.c 2021-09-24 17:56:14.000000000 +0200 @@ -34,13 +34,13 @@ c < 0x80 && escape != LITERAL && ((escape == NORMAL && (c < 0x20 || - c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' || + c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' || c == '>' || c == '\\' || c == '`' || c == '!' || (c == '&' && cmark_isalpha(nextc)) || (c == '!' && nextc == '[') || - ((CMARK_OPT_SMART & options) && - ((c == '-' && nextc == '-') || - (c == '.' && nextc == '.') || - c == '"' || c == '\'')) || + ((CMARK_OPT_SMART & options) && + ((c == '-' && nextc == '-') || + (c == '.' && nextc == '.') || + c == '"' || c == '\'')) || (renderer->begin_content && (c == '-' || c == '+' || c == '=') && // begin_content doesn't get set to false til we've passed digits // at the beginning of line, so... @@ -366,8 +366,8 @@ } } extra_spaces = code_len == 0 || - code[0] == '`' || code[code_len - 1] == '`' || - (has_nonspace && code[0] == ' ' && code[code_len - 1] == ' '); + code[0] == '`' || code[code_len - 1] == '`' || + (has_nonspace && code[0] == ' ' && code[code_len - 1] == ' '); for (i = 0; i < numticks; i++) { LIT("`"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/houdini_href_e.c new/cmark-0.30.2/src/houdini_href_e.c --- old/cmark-0.30.0/src/houdini_href_e.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/houdini_href_e.c 2021-09-24 17:56:14.000000000 +0200 @@ -7,13 +7,13 @@ /* * The following characters will not be escaped: * - * -_.+!*'(),%#@?=;:/,+&$ alphanum + * -_.+!*'(),%#@?=;:/,+&$~ alphanum * * Note that this character set is the addition of: * - * - The characters which are safe to be in an URL - * - The characters which are *not* safe to be in - * an URL because they are RESERVED characters. + * - The characters which are safe to be in an URL + * - The characters which are *not* safe to be in + * an URL because they are RESERVED characters. * * We assume (lazily) that any RESERVED char that * appears inside an URL is actually meant to @@ -35,7 +35,7 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -81,9 +81,9 @@ * for now. the plus thing is more commonly seen * when building GET strings */ #if 0 - case ' ': - cmark_strbuf_putc(ob, '+'); - break; + case ' ': + cmark_strbuf_putc(ob, '+'); + break; #endif /* every other character goes with a %XX escaping */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/houdini_html_u.c new/cmark-0.30.2/src/houdini_html_u.c --- old/cmark-0.30.0/src/houdini_html_u.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/houdini_html_u.c 2021-09-24 17:56:14.000000000 +0200 @@ -75,7 +75,7 @@ } if (num_digits >= 1 && num_digits <= max_digits && - i < size && src[i] == ';') { + i < size && src[i] == ';') { if (codepoint == 0 || (codepoint >= 0xD800 && codepoint < 0xE000) || codepoint >= 0x110000) { codepoint = 0xFFFD; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/inlines.c new/cmark-0.30.2/src/inlines.c --- old/cmark-0.30.0/src/inlines.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/inlines.c 2021-09-24 17:56:14.000000000 +0200 @@ -33,6 +33,7 @@ struct delimiter *previous; struct delimiter *next; cmark_node *inl_text; + bufsize_t position; bufsize_t length; unsigned char delim_char; bool can_open; @@ -41,7 +42,6 @@ typedef struct bracket { struct bracket *previous; - struct delimiter *previous_delimiter; cmark_node *inl_text; bufsize_t position; bool image; @@ -363,7 +363,7 @@ switch (s->ptr[r]) { case '\r': if (s->ptr[r + 1] != '\n') { - s->ptr[w++] = ' '; + s->ptr[w++] = ' '; } break; case '\n': @@ -529,6 +529,7 @@ delim->can_open = can_open; delim->can_close = can_close; delim->inl_text = inl_text; + delim->position = subj->pos; delim->length = inl_text->len; delim->previous = subj->last_delim; delim->next = NULL; @@ -547,7 +548,6 @@ b->active = true; b->inl_text = inl_text; b->previous = subj->last_bracket; - b->previous_delimiter = subj->last_delim; b->position = subj->pos; b->bracket_after = false; subj->last_bracket = b; @@ -639,19 +639,22 @@ } } -static void process_emphasis(subject *subj, delimiter *stack_bottom) { - delimiter *closer = subj->last_delim; +static void process_emphasis(subject *subj, bufsize_t stack_bottom) { + delimiter *candidate; + delimiter *closer = NULL; delimiter *opener; delimiter *old_closer; bool opener_found; int openers_bottom_index = 0; - delimiter *openers_bottom[9] = {stack_bottom, stack_bottom, stack_bottom, - stack_bottom, stack_bottom, stack_bottom, - stack_bottom, stack_bottom, stack_bottom}; + bufsize_t openers_bottom[9] = {stack_bottom, stack_bottom, stack_bottom, + stack_bottom, stack_bottom, stack_bottom, + stack_bottom, stack_bottom, stack_bottom}; // move back to first relevant delim. - while (closer != NULL && closer->previous != stack_bottom) { - closer = closer->previous; + candidate = subj->last_delim; + while (candidate != NULL && candidate->position >= stack_bottom) { + closer = candidate; + candidate = candidate->previous; } // now move forward, looking for closers, and handling each @@ -669,7 +672,7 @@ break; case '*': openers_bottom_index = 3 + - (closer->can_open ? 3 : 0) + (closer->length % 3); + (closer->can_open ? 3 : 0) + (closer->length % 3); break; default: assert(false); @@ -678,12 +681,13 @@ // Now look backwards for first matching opener: opener = closer->previous; opener_found = false; - while (opener != NULL && opener != openers_bottom[openers_bottom_index]) { + while (opener != NULL && + opener->position >= openers_bottom[openers_bottom_index]) { if (opener->can_open && opener->delim_char == closer->delim_char) { // interior closer of size 2 can't match opener of size 1 // or of size 1 can't match 2 if (!(closer->can_open || opener->can_close) || - closer->length % 3 == 0 || + closer->length % 3 == 0 || (opener->length + closer->length) % 3 != 0) { opener_found = true; break; @@ -698,22 +702,26 @@ } else { closer = closer->next; } - } else if (closer->delim_char == '\'') { - cmark_node_set_literal(closer->inl_text, RIGHTSINGLEQUOTE); - if (opener_found) { - cmark_node_set_literal(opener->inl_text, LEFTSINGLEQUOTE); + } else if (closer->delim_char == '\'' || closer->delim_char == '"') { + if (closer->delim_char == '\'') { + cmark_node_set_literal(closer->inl_text, RIGHTSINGLEQUOTE); + } else { + cmark_node_set_literal(closer->inl_text, RIGHTDOUBLEQUOTE); } closer = closer->next; - } else if (closer->delim_char == '"') { - cmark_node_set_literal(closer->inl_text, RIGHTDOUBLEQUOTE); if (opener_found) { - cmark_node_set_literal(opener->inl_text, LEFTDOUBLEQUOTE); + if (old_closer->delim_char == '\'') { + cmark_node_set_literal(opener->inl_text, LEFTSINGLEQUOTE); + } else { + cmark_node_set_literal(opener->inl_text, LEFTDOUBLEQUOTE); + } + remove_delimiter(subj, opener); + remove_delimiter(subj, old_closer); } - closer = closer->next; } if (!opener_found) { // set lower bound for future searches for openers - openers_bottom[openers_bottom_index] = old_closer->previous; + openers_bottom[openers_bottom_index] = old_closer->position; if (!old_closer->can_open) { // we can remove a closer that can't be an // opener, once we've seen there's no @@ -726,7 +734,8 @@ } } // free all delimiters in list until stack_bottom: - while (subj->last_delim != NULL && subj->last_delim != stack_bottom) { + while (subj->last_delim != NULL && + subj->last_delim->position >= stack_bottom) { remove_delimiter(subj, subj->last_delim); } } @@ -1201,7 +1210,7 @@ // Free the bracket [: cmark_node_free(opener->inl_text); - process_emphasis(subj, opener->previous_delimiter); + process_emphasis(subj, opener->position); pop_bracket(subj); // Now, if we have a link, we also want to deactivate earlier link @@ -1379,7 +1388,7 @@ while (!is_eof(&subj) && parse_inline(&subj, parent, options)) ; - process_emphasis(&subj, NULL); + process_emphasis(&subj, 0); // free bracket and delim stack while (subj.last_delim) { remove_delimiter(&subj, subj.last_delim); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/latex.c new/cmark-0.30.2/src/latex.c --- old/cmark-0.30.0/src/latex.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/latex.c 2021-09-24 17:56:14.000000000 +0200 @@ -265,7 +265,7 @@ case 4: LIT("iv"); break; case 5: LIT("v"); break; default: LIT("i"); break; - } + } LIT("}{"); OUT(list_number_string, false, NORMAL); LIT("}"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/libcmark.pc.in new/cmark-0.30.2/src/libcmark.pc.in --- old/cmark-0.30.0/src/libcmark.pc.in 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/libcmark.pc.in 2021-09-24 17:56:14.000000000 +0200 @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: libcmark Description: CommonMark parsing, rendering, and manipulation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/man.c new/cmark-0.30.2/src/man.c --- old/cmark-0.30.0/src/man.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/man.c 2021-09-24 17:56:14.000000000 +0200 @@ -76,10 +76,25 @@ int list_number; bool entering = (ev_type == CMARK_EVENT_ENTER); bool allow_wrap = renderer->width > 0 && !(CMARK_OPT_NOBREAKS & options); + struct block_number *new_block_number; + cmark_mem *allocator = cmark_get_default_mem_allocator(); // avoid unused parameter error: (void)(options); + // indent inside nested lists + if (renderer->block_number_in_list_item && + node->type < CMARK_NODE_FIRST_INLINE) { + if (entering) { + renderer->block_number_in_list_item->number += 1; + if (renderer->block_number_in_list_item->number == 2) { + CR(); + LIT(".RS"); // indent + CR(); + } + } + } + switch (node->type) { case CMARK_NODE_DOCUMENT: break; @@ -101,6 +116,10 @@ case CMARK_NODE_ITEM: if (entering) { + new_block_number = allocator->calloc(1, sizeof(struct block_number)); + new_block_number->number = 0; + new_block_number->parent = renderer->block_number_in_list_item; + renderer->block_number_in_list_item = new_block_number; CR(); LIT(".IP "); if (cmark_node_get_list_type(node->parent) == CMARK_BULLET_LIST) { @@ -118,6 +137,16 @@ } CR(); } else { + if (renderer->block_number_in_list_item) { + if (renderer->block_number_in_list_item->number >= 2) { + CR(); + LIT(".RE"); // de-indent + } + new_block_number = renderer->block_number_in_list_item; + renderer->block_number_in_list_item = + renderer->block_number_in_list_item->parent; + allocator->free(new_block_number); + } CR(); } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/render.c new/cmark-0.30.2/src/render.c --- old/cmark-0.30.0/src/render.c 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/render.c 2021-09-24 17:56:14.000000000 +0200 @@ -163,9 +163,10 @@ cmark_iter *iter = cmark_iter_new(root); cmark_renderer renderer = {options, - mem, &buf, &pref, 0, width, - 0, 0, true, true, false, - false, outc, S_cr, S_blankline, S_out}; + mem, &buf, &pref, 0, width, + 0, 0, true, true, false, + false, NULL, + outc, S_cr, S_blankline, S_out}; while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) { cur = cmark_iter_get_node(iter); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/src/render.h new/cmark-0.30.2/src/render.h --- old/cmark-0.30.0/src/render.h 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/src/render.h 2021-09-24 17:56:14.000000000 +0200 @@ -10,6 +10,11 @@ typedef enum { LITERAL, NORMAL, TITLE, URL } cmark_escaping; +struct block_number { + int number; + struct block_number *parent; +}; + struct cmark_renderer { int options; cmark_mem *mem; @@ -23,6 +28,7 @@ bool begin_content; bool no_linebreaks; bool in_tight_list_item; + struct block_number *block_number_in_list_item; void (*outc)(struct cmark_renderer *, cmark_escaping, int32_t, unsigned char); void (*cr)(struct cmark_renderer *); void (*blankline)(struct cmark_renderer *); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/test/pathological_tests.py new/cmark-0.30.2/test/pathological_tests.py --- old/cmark-0.30.0/test/pathological_tests.py 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/test/pathological_tests.py 2021-09-24 17:56:14.000000000 +0200 @@ -67,6 +67,9 @@ "mismatched openers and closers": (("*a_ " * 50000), re.compile("([*]a[_] ){49999}[*]a_")), + "issue #389": + (("*a " * 20000 + "_a*_ " * 20000), + re.compile("(<em>a ){20000}(_a<\/em>_ ?){20000}")), "openers and closers multiple of 3": (("a**b" + ("c* " * 50000)), re.compile("a[*][*]b(c[*] ){49999}c[*]")), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.30.0/test/regression.txt new/cmark-0.30.2/test/regression.txt --- old/cmark-0.30.0/test/regression.txt 2021-06-20 22:06:41.000000000 +0200 +++ new/cmark-0.30.2/test/regression.txt 2021-09-24 17:56:14.000000000 +0200 @@ -190,3 +190,11 @@ <p>**<em><strong>Hello<em>world</em></strong></em></p> ```````````````````````````````` +Issue #424 - emphasis before links + +```````````````````````````````` example +*text* [link](#section) +. +<p><em>text</em> <a href="#section">link</a></p> +```````````````````````````````` +