It now uses FNV1a and we now sort/bsearch only contents of single bucket.
Additionally we fix#20 by disabling the invalid ref. definitions during
hashtable build.
It is now much more compatible to Cmark-gfm.
With the flag MD_FLAG_PERMISSIVEWWWAUTOLINKS, we now also support the
WWW autolinks (when the http: scheme is omitted).
At the cost of remembering all reference definitions (even when having
same label), we improved the lookup from O(n) to O(log(n)).
This also fixes potential DOS attack by providing input with thousandslink
reference definitions and references to them.
Make MD_BLOCK_OL_DETAIL and MD_BLOCK_UL_DETAIL (new structure) expose more
info about the lists.
In particular flag whether the list is tight or loose, and info about the
fundamental chartacter making the list item marks.
* md4c.h now contains macros MD_VERSION_xxxx.
* md2html has option --version.
(Of course those shall have some meaningful values only when we introduce
some release process.)
Calling md_push_container_bytes() may result in ending a current block
which may result in removing some contents from ctx->block_bytes when
removing some lines with link reference definitions.
This in effect means we have to end the block explicitly before storing
the offset into the ctx->block_bytes.
* Change API (md4c.h) to propagate different substring type info to renderer.
* Implement/refactor related code in the parser.
* Adapt renderer (md2html) to the new API.
Remove MD_SPAN_IMG_DETAIL::alt. Instead, the contents of the image is
propagated to the renderer via MD_RENDERER::text() callback.
* This fixes handling of entities inside the image text (issue #4).
* It simplifies parsing and, more importantly, it better distingusshes
what is responsibility of parser or renderer respectively.
* This allows more flexibility on renderers side. Renderer who do not
* really support images can just output the image content as any
other text.
The cost is a renderer into HTML (if it wants to render image contents
into the attribute ALT of the IMG tag), has to handle images with more
care. Typically such renderer has to track whether it is inside an image,
and if so, then render span enter/leave as an empty string.