md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
git clone https://noulin.net/git/md4c.git
Log | Files | Refs | README | LICENSE

commit aacbbfae6414e9aba479220a7afc0412c90dc62e
parent 96a928089ba63ac5e03cd3241c111838819b10c2
Author: Martin Mitas <mity@morous.org>
Date:   Sat, 26 Nov 2016 14:08:27 +0100

Minor clean-up.

Diffstat:
Mmd4c/md4c.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/md4c/md4c.c b/md4c/md4c.c @@ -5015,8 +5015,6 @@ md_process_doc(MD_CTX *ctx) OFF off = 0; int ret = 0; - md_build_mark_char_map(ctx); - MD_ENTER_BLOCK(MD_BLOCK_DOC, NULL); while(off < ctx->size) { @@ -5078,9 +5076,8 @@ md_parse(const MD_CHAR* text, MD_SIZE size, const MD_RENDERER* renderer, void* u ctx.size = size; memcpy(&ctx.r, renderer, sizeof(MD_RENDERER)); ctx.userdata = userdata; - - /* Offset for indented code block. */ ctx.code_indent_offset = (ctx.r.flags & MD_FLAG_NOINDENTEDCODEBLOCKS) ? (OFF)(-1) : 4; + md_build_mark_char_map(&ctx); /* All the work. */ ret = md_process_doc(&ctx);