Fix use of the cmake package
Fix use of the cmake package and its imported targets.
Make sure that the include dir comes with the cmake targets
Put everything under md4cConfig so that the md4c-html can see
md4c.
Use md4c namespace so that the targets become md4c::md4c and
md4c::md4c-html following cmake standards for imported targets.
Fixes#145.
The old version likely could stop prematurely in a corner case when
there was a Unicode character at the end of the either string, which
maps into multiple fold info codepoints.
Fixes#142.
Use a macro that dispatches to the compiler-specific magic
to silence implicit fallthrough warnings when the fallthrough
was actually intended. The code already featured comments,
so these are actually safe to place.
(Unfortunately, Clang does not recognize any comment as
"fall through" comment, and GCC only recognizes some variations
of "fall through", not "pass through". Moreover, one of the
comments replaced here had a typo...)
We were recognizing the list item marks when a new line or a blank
character follows.
However, given end-of-file means implicitly also an end-of-line, we
should recognize in that situation too.
Fixes#139.
This allows renderers to have the info about table dimension (table
column and row count) in advance and e.g. simplify their memory
allocation strategy.
The autolinks now allow unmatched parenthesis, only the trailing
parenthesis closers are handled specially to deal with the situation the
autolink is all inside an outer parenthesis.
Somehow our tests were broken and avoided the cases with unmatched
parenthesis pairs inside the auto-link. That's now fixed and in sync
with GFM specs too.
Fixes#135.
Fixes the following, reported by clang analysis:
src/md4c.c:3729:61: warning: variable 'opener_index' may be uninitialized when used here [-Wconditional-uninitialized]
MD_MARKCHAIN* opener_chain = md_mark_chain(ctx, opener_index);
^~~~~~~~~~~~
src/md4c.c:3686:25: note: initialize the variable 'opener_index' to silence this warning
int opener_index;
^
= 0
Documentation https://github.com/mity/md4c/wiki/Building-MD4C says to use
build/ for cmake. I noticed that .gitignore contains a directory called
build-aux -- perhaps the author were using that and either forgot to update
the gitignore file or the documentation.