summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-23 07:08:57 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-23 07:08:57 -0800
commit1b6a4ce8ab921ddc98581abd395428e2cadd0c22 (patch)
tree51cf1a80b7d48351ec1c17046e5cae3d86baa18d /src/print.c
parent8ba087276c6cae9e1efde656ae973b4f714c88be (diff)
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.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c10
1 files changed, 2 insertions, 8 deletions
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);