commit c91d636baf766d88201ab8faad8e011850f5e33b
parent e01275811fef8e046940546d16431d252da74350
Author: Martin Mitas <mity@morous.org>
Date: Tue, 4 Oct 2016 20:31:26 +0200
Rename MD_TEXT_CODEBLOCK to MD_TEXT_CODE.
In text callback, caller should not care whether the code is inside a
block or inline span of code. Caller should just output it in the verbatim
form.
Diffstat:
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/md4c/md4c.c b/md4c/md4c.c
@@ -882,7 +882,7 @@ md_process_block(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
break;
case MD_BLOCK_CODE:
- ret = md_process_verbatim_block(ctx, MD_TEXT_CODEBLOCK, lines, n_lines);
+ ret = md_process_verbatim_block(ctx, MD_TEXT_CODE, lines, n_lines);
break;
case MD_BLOCK_HTML:
diff --git a/md4c/md4c.h b/md4c/md4c.h
@@ -95,10 +95,11 @@ enum MD_TEXTTYPE_tag {
/* Normal text. */
MD_TEXT_NORMAL = 0,
- /* Text in a code block (inside MD_BLOCK_CODE).
- * Includes spaces for indentation and '\n' for new lines.
- * MD_TEXT_BR and MD_TEXT_SOFTBR are not sent for this kind of text. */
- MD_TEXT_CODEBLOCK,
+ /* Text in a code block (inside MD_BLOCK_CODE) or inlined code (`code`).
+ * If it is inside MD_BLOCK_CODE, it includes spaces for indentation and
+ * '\n' for new lines. MD_TEXT_BR and MD_TEXT_SOFTBR are not sent for this
+ * kind of text. */
+ MD_TEXT_CODE,
/* Text is a raw HTML. */
MD_TEXT_HTML