Md4c

Latest version: v1.0.0

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.4.4

Changes:

* Make Unicode-specific code compliant to Unicode 13.0.

New features:

* The HTML renderer, developed originally as the heart of the `md2html`
utility, is now built as a standalone library, in order to simplify its
reuse in applications.

* With `MD_HTML_FLAG_SKIP_UTF8_BOM`, the HTML renderer now skips UTF-8 byte
order mark (BOM) if the input begins with it, before passing to the Markdown
parser.

`md2html` utility automatically enables the flag (unless it is custom-built
with `-DMD4C_USE_ASCII`).

* With `MD_HTML_FLAG_XHTML`, The HTML renderer generates XHTML instead of
HTML.

This effectively means `<br />` instead of `<br>`, `<hr />` instead of
`<hr>`, and `<img ... />` instead of `<img ...>`.

`md2html` utility now understands the command line option `-x` or `--xhtml`
enabling the XHTML mode.

Fixes:

* [113](https://github.com/mity/md4c/issues/113):
Add missing folding info data for the following Unicode characters:
`U+0184`, `U+018a`, `U+01b2`, `U+01b5`, `U+01f4`, `U+0372`, `U+038f`,
`U+1c84`, `U+1fb9`, `U+1fbb`, `U+1fd9`, `U+1fdb`, `U+1fe9`, `U+1feb`,
`U+1ff9`, `U+1ffb`, `U+2c7f`, `U+2ced`, `U+a77b`, `U+a792`, `U+a7c9`.

Due the bug, the link definition label matching did not work in the case
insensitive way for these characters.

0.4.3

New features:

* With `MD_FLAG_UNDERLINE`, spans enclosed in underscore (`_foo_`) are seen
as underline (`MD_SPAN_UNDERLINE`) rather than an ordinary emphasis or
strong emphasis.

Changes:

* The implementation of wiki-links extension (with `MD_FLAG_WIKILINKS`) has
been simplified.

- A noticeable increase of MD4C's memory footprint introduced by the
extension implementation in 0.4.0 has been removed.
- The priority handling towards other inline elements have been unified.
(This affects an obscure case where syntax of an image was in place of
wiki-link destination made the wiki-link invalid. Now *all* inline spans
in the wiki-link destination, including the images, is suppressed.)
- The length limitation of 100 characters now always applies to wiki-link
destination.

* Recognition of strike-through spans (with the flag `MD_FLAG_STRIKETHROUGH`)
has become much stricter and, arguably, reasonable.

- Only single tildes (`~`) and double tildes (`~~`) are recognized as
strike-through marks. Longer ones are not anymore.
- The length of the opener and closer marks have to be the same.
- The tildes cannot open a strike-through span if a whitespace follows.
- The tildes cannot close a strike-through span if a whitespace precedes.

This change follows the changes of behavior in cmark-gfm some time ago, so
it is also beneficial from compatibility point of view.

* When building MD4C by hand instead of using its CMake-based build, the UTF-8
support was by default disabled, unless explicitly asked for by defining
a preprocessor macro `MD4C_USE_UTF8`.

This has been changed and the UTF-8 mode now becomes the default, no matter
how `md4c.c` is compiled. If you need to disable it and use the ASCII-only
mode, you have explicitly define macro `MD4C_USE_ASCII` when compiling it.

(The CMake-based build as provided in our repository explicitly asked for
the UTF-8 support with `-DMD4C_USE_UTF8`. I.e. if you are using MD4C library
built with our vanilla `CMakeLists.txt` files, this change should not affect
you.)

Fixes:

* Fixed some string length handling in the special `MD4C_USE_UTF16` build.

(This does not affect you unless you are on Windows and explicitly define
the macro when building MD4C.)

* [100](https://github.com/mity/md4c/issues/100):
Fixed an off-by-one error in the maximal length limit of some segments
of e-mail addresses used in autolinks.

* [107](https://github.com/mity/md4c/issues/107):
Fix mis-detection of asterisk-encoded emphasis in some corner cases when
length of the opener and closer differs, as in `***foo *bar baz***`.

0.4.2

Fixes:

* [98](https://github.com/mity/md4c/issues/98):
Fix mis-detection of asterisk-encoded emphasis in some corner cases when
length of the opener and closer differs, as in `**a *b c** d*`.

0.4.1

Unfortunately, 0.4.0 has been released with badly updated ChangeLog. Fixing
this is the only change on 0.4.1.

0.4.0

New features:

* With `MD_FLAG_LATEXMATHSPANS`, LaTeX math spans (`$...$`) and LaTeX display
math spans (`$$...$$`) are now recognized. (Note though that the HTML
renderer outputs them verbatim in a custom `<x-equation>` tag.)

Contributed by [Tilman Roeder](https://github.com/dyedgreen).

* With `MD_FLAG_WIKILINKS`, Wiki-style links (`[[...]]`) are now recognized.
(Note though that the HTML renderer renders them as a custom `<x-wikilink>`
tag.)

Contributed by [Nils Blomqvist](https://github.com/niblo).

Changes:

* Parsing of tables (with `MD_FLAG_TABLES`) is now closer to the way how
cmark-gfm parses tables as we do not require every row of the table to
contain a pipe `|` anymore.

As a consequence, paragraphs now cannot interrupt tables. A paragraph which
follows the table has to be delimited with a blank line.

Fixes:

* [94](https://github.com/mity/md4c/issues/94):
`md_build_ref_def_hashtable()`: Do not allocate more memory than strictly
needed.

* [95](https://github.com/mity/md4c/issues/95):
`md_is_container_mark()`: Ordered list mark requires at least one digit.

* [96](https://github.com/mity/md4c/issues/96):
Some fixes for link label comparison.

0.3.4

Changes:

* Make Unicode-specific code compliant to Unicode 12.1.

* Structure `MD_BLOCK_CODE_DETAIL` got new member `fenced_char`. Application
can use it to detect character used to form the block fences (`` ` `` or
`~`). In the case of indented code block, it is set to zero.

Fixes:

* [77](https://github.com/mity/md4c/issues/77):
Fix maximal count of digits for numerical character references, as requested
by CommonMark specification 0.29.

* [78](https://github.com/mity/md4c/issues/78):
Fix link reference definition label matching for Unicode characters where
the folding mapping leads to multiple codepoints, as e.g. in `ẞ` -> `SS`.

* [83](https://github.com/mity/md4c/issues/83):
Fix recognition of an empty blockquote which interrupts a paragraph.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.