From e9e4fa11de887c3e558310d3ef3bc6215510f6f4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 14 Dec 2014 14:03:08 -0800 Subject: Use chunk for fenced code info, instead of strbuf. --- src/print.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/print.c') diff --git a/src/print.c b/src/print.c index 951d238..22daeac 100644 --- a/src/print.c +++ b/src/print.c @@ -78,14 +78,17 @@ static void render_nodes(strbuf* buffer, cmark_node* node, int indent) break; case NODE_CODE_BLOCK: strbuf_printf(buffer, "code_block info="); - print_str(buffer, node->as.code.info.ptr, -1); + print_str(buffer, node->as.code.info.data, + node->as.code.info.len); strbuf_putc(buffer, ' '); - print_str(buffer, node->string_content.ptr, -1); + print_str(buffer, node->as.literal.data, + node->as.literal.len); strbuf_putc(buffer, '\n'); break; case NODE_HTML: strbuf_printf(buffer, "html "); - print_str(buffer, node->string_content.ptr, -1); + print_str(buffer, node->as.literal.data, + node->as.literal.len); strbuf_putc(buffer, '\n'); break; case NODE_TEXT: -- cgit v1.2.3