Commit Graph

683 Commits

Author SHA1 Message Date
Martin Mitas
c595c2ed00 md_process_verbatim_block_contents: Fix off by 1 error.
This caused outputting wrong indentation inside a fenced code blocks for
lines indented with mor ethan 16 spaces.

Fixes #124.
2020-07-30 08:38:19 +02:00
Martin Mitas
470b42c752 README.md: Fix a typo. 2020-07-28 08:12:57 +02:00
Martin Mitas
0c4d7f3d85 test/normalize.py: Use html.escape instead of cgi.escape.
Fixes #123.
2020-07-28 07:20:51 +02:00
Nazar Vinnichuk
4ad801b771 Replace deprecated MD_RENDERER mentions in md4c.h. 2020-07-28 07:15:27 +02:00
Martin Mitas
1b437db511 README.md: Small rewording. 2020-07-23 10:23:25 +02:00
Martin Mitas
2aa694a395 README.md: Small clarification. 2020-07-22 10:53:09 +02:00
Evan Klitzke
da27ee0dcd fix a comment typo in md4c-html.h, md_render_html -> md_html 2020-07-12 22:20:18 +02:00
Chris White
5b1d5db07b Add .gitignore 2020-06-28 16:27:25 +02:00
Martin Mitas
2ef9bc4f14 README.md: Small update. 2020-06-28 16:20:17 +02:00
Martin Mitas
dec6e22b0e Fix entity rendering with MD_HTML_FLAG_VERBATIM_ENTITIES.
Fixes #118.
2020-06-27 20:27:28 +02:00
Martin Mitas
7021024ded Bump version to 0.4.4. 2020-05-29 17:21:21 +02:00
Martin Mitas
4e7da1c1cd CHANGELOG.md: Improve some wording. 2020-05-29 17:16:22 +02:00
Martin Mitas
84fddf4848 README.md: Small assorted updates. 2020-05-29 17:12:01 +02:00
Dominick C. Pastore
3e5d64bf44
Add missing <img /> tag to XHTML support (#116) 2020-05-29 16:42:38 +02:00
Martin Mitas
4eaa83b23f Update CHANGELOG.md. 2020-05-20 17:17:16 +02:00
Martin Mitas
72dad97ed6 scripts/build_folding_map.py: Handle properly "ranges" of length 2.
Update the data structures in md_get_unicode_fold_info() to reflect the
update in the script and handle the previously omitted characters.

Fixes #113.
2020-05-20 16:44:07 +02:00
Martin Mitas
25096c7c98 CHANGELOG.md: Update. 2020-05-07 23:14:59 +02:00
Dmitry Atamanov
3d64d6be9b
Update to Unicode 13.0 (#111) 2020-05-07 23:13:55 +02:00
Martin Mitas
47b21fb544 CHANGELOG.md: Fix the spelling of the HTML renderer flags. 2020-05-04 12:57:41 +02:00
Martin Mitas
ddcc1f34df HTML renderer: Add support for XHTML mode. 2020-05-04 12:54:15 +02:00
Dominick C. Pastore
0baa0fe43d
Add a link to PyMD4C in README.md (#110) 2020-04-29 17:59:12 +02:00
Martin Mitáš
37f57ed678
Merge pull request #89 from mity/refactor
Refactor:
 * Move the HTML renderer  code from md2html to src dir.
 * Build the HTML renderer as a standalone library.
2020-04-28 08:11:28 +02:00
Martin Mitas
711fff1c8f CHANGELOG.md: Add a note about the new standalone HTML renderer lib. 2020-04-28 08:08:18 +02:00
Martin Mitas
2728b9eb0f Move md2html utility to a standalone dir. 2020-04-20 19:37:18 +02:00
Martin Mitas
ce8c66060c Fix the build. 2020-04-20 19:32:13 +02:00
Martin Mitas
da6f519d86 README.md: Update to reflect the changes for the HTML converter. 2020-04-20 19:27:46 +02:00
Martin Mitas
1f78c867ff Rename HTML renderer public identifier names.
This is to reflect we make it a public API.
2020-04-20 19:24:28 +02:00
Martin Mitas
77c2669bd1 Update generating pkgconfig .pc files.
* Output also package URL.
 * Output also package description.
 * Output also package version.
 * Generate .pc file for the new renderer lib.
2020-04-20 19:22:42 +02:00
Martin Mitas
ed0ef280b3 Build the HTML renderer as a standalong library. 2020-04-20 19:22:42 +02:00
Martin Mitas
7f2d880f9a Refactor dir structure.
We place all the sources in the single directory in order to not having
many dirs with too few sources.
2020-04-20 19:22:42 +02:00
Martin Mitas
f9da19972e md_is_link_reference_definition: Fix error paths. 2020-03-14 11:20:07 +01:00
Martin Mitas
d0e3ed79bf md2html: Skip UTF-8 BOM, if present in the input. 2020-03-12 23:08:29 +01:00
Martin Mitas
a4136b813d Get rid of IS_INPUT_STR() macro.
It has relied on a behavior undefined in C standard, so lets use
explicit flags remembering whether we need to free the strings or not.

Fixes #109.
2020-03-02 15:34:24 +01:00
Martin Mitas
e33bb733bb md2html: Migrate to cmdline.[hc] from C-Reusables.
This fixes many warnings from gcc 9.2.
2020-03-02 15:34:24 +01:00
Martin Mitas
2b294a2c21 README.md: Add QOwnNotes into SW using us. 2020-02-18 10:24:21 +01:00
Martin Mitas
ebed9afaf8 Migrate from travis-ci.org to travis-ci.com.
See https://docs.travis-ci.com/user/migrate/open-source-on-travis-ci-com/
2020-02-17 18:04:55 +01:00
Martin Mitas
9e6ab76c24 Minor fuzz-input cleanup.
Move some permissive links incorrectly placed in commonmark.md into
gfm.md.
2020-02-17 12:41:50 +01:00
Martin Mitas
9b101afd35 Bump version 0.4.3. 2020-02-17 12:15:40 +01:00
Martin Mitas
cc9a9d28ca test/fuzz-test: Add some fuzzing testing initial input. 2020-02-16 15:29:54 +01:00
Martin Mitas
5d7c35973e md_analyze_emph: Detect correctly opener chain when resolving the range.
Fixes #107.
2020-02-16 13:51:05 +01:00
Martin Mitas
e278609ee0 README.md: Few more wording improvements. 2020-02-15 12:05:23 +01:00
Martin Mitas
259c94ddd4 README.md: Minor wording improvements. 2020-02-14 21:35:40 +01:00
Martin Mitas
e00a9e1a01 Travis CI: Enforce -Wdeclaration-after-statement -Werror and newer distro image. 2020-02-13 12:47:23 +01:00
Martin Mitas
437427c8f5 CHANGELOG.md: Describe the recent changes for wiki-links. 2020-02-13 11:37:01 +01:00
Martin Mitas
03119753d9 md_resolve_links: Fix scanning over dummy marks. 2020-02-13 09:51:55 +01:00
Martin Mitas
b4c30cd6e6 Improve wiki-link parsing.
* Get rid of MD_LINE::total_indent.

 * Remove some special complicated branching for nested images: Instead
   we use md_rollback() the wiki-link destination span to kill _any_
   marks resolved so far, including the images.

 * Remove any length limit from label. Only destination length is
   limited, regardless of whether '|' is present or not.

 * Move the special handling of `[[foo|]]` from md_process_inlines()
   into md_resolve_links(). We simply expand the closer mark to consume
   the `|`.

 * Do not modify the opener and closer marks until we really know it
   is indeed a wiki-link.
2020-02-13 02:50:15 +01:00
Martin Mitas
df58278539 travis CI: Enforce -std=c89.
Also fix all related warnings and errors. This should help Qt team which
needs to build MD4C with Integrity compiler for some embedded platforms.
2020-02-12 22:23:56 +01:00
Martin Mitas
af1c0b11c4 Change all aux. buffers growing factor to 1.5.
This is in general better in order to avoid heap fragmentation.

When growing a buffer N times with the old factor of two (and when
realloc() cannot just grow in-place), we create a gap 2^N-1 bytes
long, but asking for 2^N bytes. This ever-growing hard-to-reuse
gap can cause troubles to some heap allocators.

See e.g. https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md
2020-01-27 11:54:10 +01:00
Martin Mitas
6709a869d4 MD_LINK_ATTR: Add flag title_needs_free.
Use the flag to prpagate to md_resolve_links() whether the retrieved
link title needs to be freed by the caller or not.

Fixes #105.
2020-01-16 17:09:41 +01:00
Martin Mitas
4eb4e1dc10 CHANGELOG.md: Remove the record for #104 because previous versions were not affected. 2020-01-16 16:34:00 +01:00