SHA256
8
0
forked from pool/cmark

18 Commits

Author SHA256 Message Date
0dfcc42bda Accepting request 1163938 from home:Jianhua:branches:devel:libraries:c_c++
- update to 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 (commonmark/commonmark.js#277).
  * 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 (#523).
    This avoids a massive slowdown in MSYS2.
  * commonmark writer: less aggressive escaping for `!` (#131).
  * 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 (#498).
    + 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 (Pomax, #525).

OBS-URL: https://build.opensuse.org/request/show/1163938
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=32
2024-04-14 07:34:01 +00:00
7da3aa2acd Accepting request 1072818 from home:AndreasStieger:branches:devel:libraries:c_c++
cmark 0.30.3
CVE-2023-22486 boo#1207674
CVE-2023-22484 boo#1207438

OBS-URL: https://build.opensuse.org/request/show/1072818
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=30
2023-03-18 21:46:52 +00:00
13050142a1 Accepting request 934673 from home:cgiboudeaux:branches:devel:libraries:c_c++
- Fix dependencies.
  cmark-targets-*.cmake creates a 'cmark::cmark_exe' target. The
  cmark executable is required.

OBS-URL: https://build.opensuse.org/request/show/934673
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=29
2021-12-08 09:41:21 +00:00
145df4c5a4 Accepting request 924169 from home:mimi_vx:branches:devel:libraries:c_c++
- 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

OBS-URL: https://build.opensuse.org/request/show/924169
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=28
2021-10-08 09:09:10 +00:00
73b0346923 Accepting request 901085 from home:mimi_vx:branches:devel:libraries:c_c++
- 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.

OBS-URL: https://build.opensuse.org/request/show/901085
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=26
2021-06-21 06:47:03 +00:00
d72fe32f11 Accepting request 893093 from home:simotek:branches:devel:libraries:c_c++
-  %cmake_build is now the recommended way to build cmake projects

OBS-URL: https://build.opensuse.org/request/show/893093
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=24
2021-06-01 10:32:09 +00:00
777d782818 Accepting request 721248 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.29.0
  * Update spec to 0.29.
  * Make rendering safe by default (#239, #273).
    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.
    Borrows heavily from @kivikakk's patch in github/cmark-gfm#123.
  * 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` (#290).
  * A link destination can't start with `<` unless it is
    an angle-bracket link that also ends with `>` (#289).
    (If your URL really starts with `<`, URL-escape it.)
  * Allow internal delimiter runs to match if both have lengths that are
    multiples of 3.  See commonmark/commonmark#528.
  * Include `references.h` in `parser.h` (#287).

OBS-URL: https://build.opensuse.org/request/show/721248
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=22
2019-08-06 09:16:16 +00:00
427c7d8930 Accepting request 538800 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.28.3
 * -smart: open quote can never occur right after ] or ) 
 * Include GNUInstallDirs in src/CMakeLists.txt
 * Fix quadratic behavior in finalize
 * Don't use CMAKE_INSTALL_LIBDIR to create libcmark.pc
 - drop cmark-install_libdir_is_abs.patch

OBS-URL: https://build.opensuse.org/request/show/538800
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=20
2017-11-03 16:25:21 +00:00
af1b14fdd4 Accepting request 529897 from home:dimstar:Factory
- Add cmark-install_libdir_is_abs.patch: CMAKE_INSTALL_LIBDIR is an
  absolute path (if -DLIBDIR=%{_libdir} is being passed.

Fixes pandoc's build failure

OBS-URL: https://build.opensuse.org/request/show/529897
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=18
2017-09-29 12:45:02 +00:00
1402cd4e03 Accepting request 528141 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.28.0
  * Update spec.
  * Use unsigned integer when shifting
  * Avoid memcpy'ing NULL pointers
  * DeMorgan simplification of some tests in emphasis parser.
  * Fixed undefined shift in commonmark writer
  * latex writer:  fix memory overflow
  * Check for NULL pointer in get_link_type
  * Move fuzzing dictionary into single file
  * Reset bytes after UTF8 proc
  * Don't scan past an EOL
  * Document cases where `get_` functions return `NULL`
  * Properly handle backslashes in link destinations
  * Fixed `cmark_node_get_list_start` to return 0 for bullet lists,
    as documented
  * Use `CMARK_NO_DELIM` for bullet lists
  * Fixed code for freeing delimiter stack
  * Removed abort outside of conditional (typo).
  * Removed coercion in error message when aborting from buffer.
  * Print message to stderr when we abort due to memory demands
  * `libcmark.pc`: use `CMAKE_INSTALL_LIBDIR`
  * Fixed buffer overflow error in `S_parser_feed`
  * Update emphasis parsing for spec change.
  * Fixes for the LaTeX renderer
    + Don't double-output the link in latex-rendering.
    + Prevent ligatures in dashes sensibly when rendering latex.
      `\-` is a hyphenation, so it doesn't get displayed at all.
  * Added a test for NULL when freeing `subj->last_delim`.
  * Cleaned up setting of lower bounds for openers.
  * Fix #178, quadratic parsing bug.  Add pathological test.

OBS-URL: https://build.opensuse.org/request/show/528141
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=16
2017-09-21 20:45:13 +00:00
36786c9ecc Accepting request 441033 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.27.1
* Set policy for CMP0063 to avoid a warning
* Use VERSION_GREATER to clean up cmake version test

OBS-URL: https://build.opensuse.org/request/show/441033
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=14
2016-11-20 10:34:08 +00:00
f40650ba06 Accepting request 440907 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.27.0
* Fix CMAKE_C_VISIBILITY_PRESET for cmake versions greater than 1.8
* Fix for non-matching entities
* Modified print_delimiters (commented out) so it compiles again.
* make format: don't change order of includes.
* Changed logic for null/eol checks
    only check once for "not at end of line"
    check for null before we check for newline characters (the previous
		patch would fail for NULL + CR)
* Fix by not advancing past both \0 and \n
* Add test for NUL-LF sequence
* Fix memory leak in list parsing
* Use cmark_mem to free where used to alloc
* Allow a shortcut link before a
* Allow tabs after setext header line
* Don't let URI schemes start with spaces.
* Fixed h2..h6 HTML blocks
* Autolink scheme can contain digits
* Fix nullary function declarations in cmark.h

OBS-URL: https://build.opensuse.org/request/show/440907
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=13
2016-11-19 15:57:15 +00:00
759d1dc9c2 Accepting request 435616 from home:pluskalm:branches:devel:libraries:c_c++
- Use current cmake macros

OBS-URL: https://build.opensuse.org/request/show/435616
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=11
2016-10-16 16:26:24 +00:00
Ismail Dönmez
3ad09033df Accepting request 424006 from home:pluskalm:branches:devel:libraries:c_c++
- Fix building with different release types set via cmake

OBS-URL: https://build.opensuse.org/request/show/424006
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=9
2016-08-31 14:25:51 +00:00
433e95b850 Accepting request 409117 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.26.1
* Removed unnecessary typedef that caused build failure on some platforms.
* Use $(MAKE) in Makefile instead of hardcoded make

OBS-URL: https://build.opensuse.org/request/show/409117
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=7
2016-07-16 19:13:33 +00:00
a9b979d879 Accepting request 409027 from home:mimi_vx:branches:devel:libraries:c_c++
- update to 0.26.0
* 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.
* Fix sourcepos for atx headers).
* Fix ATX headers and thematic breaks to allow tabs as well as spaces.
* Fix chunk_set_cstr with suffix of current string
* Export targets on installation
* Fix cmake warning about CMP0048
* 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
	+ 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
* Use library functions to insert nodes in emphasis/link processing. Previously we

OBS-URL: https://build.opensuse.org/request/show/409027
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=6
2016-07-16 14:53:04 +00:00
Ismail Dönmez
f28b33d82e Accepting request 381174 from home:mimi_vx:branches:devel:libraries:c_c++
-  update to 0.25.2

OBS-URL: https://build.opensuse.org/request/show/381174
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=3
2016-03-29 12:47:57 +00:00
c2f810e24a Accepting request 339738 from home:KGronlund
Add CommonMark cmark library (libcmark)

Addressed comments on previous submission

OBS-URL: https://build.opensuse.org/request/show/339738
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmark?expand=0&rev=1
2015-10-18 21:40:04 +00:00