summaryrefslogtreecommitdiff
path: root/src/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.c')
-rw-r--r--src/html.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/html.c b/src/html.c
index 0e4f69f..4428fa4 100644
--- a/src/html.c
+++ b/src/html.c
@@ -178,7 +178,10 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type,
case CMARK_NODE_CUSTOM_BLOCK:
cr(html);
- cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
+ cmark_strbuf_put(
+ html, (const unsigned char *)(entering ? cmark_node_get_on_enter(node)
+ : cmark_node_get_on_exit(node)),
+ node->as.literal.len);
cr(html);
break;
@@ -240,7 +243,10 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type,
break;
case CMARK_NODE_CUSTOM_INLINE:
- cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
+ cmark_strbuf_put(
+ html, (const unsigned char *)(entering ? cmark_node_get_on_enter(node)
+ : cmark_node_get_on_exit(node)),
+ node->as.literal.len);
break;
case CMARK_NODE_STRONG: