From 1b6a4ce8ab921ddc98581abd395428e2cadd0c22 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 23 Nov 2014 07:08:57 -0800 Subject: Do not distinguish btw fenced and indented code in AST. Use a single CMARK_NODE_CODE_BLOCK tag for both. Distinguish them when needed for parsing by looking at the fence_length attribute, which is 0 for indented blocks. --- src/print.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/print.c') diff --git a/src/print.c b/src/print.c index 2064276..1afa584 100644 --- a/src/print.c +++ b/src/print.c @@ -143,14 +143,8 @@ static void print_blocks(cmark_node* b, int indent) case NODE_HRULE: printf("hrule\n"); break; - case NODE_INDENTED_CODE: - printf("indented_code "); - print_str(b->string_content.ptr, -1); - putchar('\n'); - break; - case NODE_FENCED_CODE: - printf("fenced_code length=%d info=", - b->as.code.fence_length); + case NODE_CODE_BLOCK: + printf("code block info="); print_str(b->as.code.info.ptr, -1); putchar(' '); print_str(b->string_content.ptr, -1); -- cgit v1.2.3