summaryrefslogtreecommitdiff
path: root/src/xml.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2020-01-18 23:37:32 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2020-01-23 08:25:54 -0800
commit75b48c5938f5984dbcf79a579d15c9cbd6447d12 (patch)
tree7c97c1d4fbcb6b7230e1d4893a2c3eff766fe0bc /src/xml.c
parentb237924585e61532ada774bf9e70eadff00666dc (diff)
Use C string instead of chunk for custom block contents
Reduces size of struct cmark_node by 8 bytes.
Diffstat (limited to 'src/xml.c')
-rw-r--r--src/xml.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xml.c b/src/xml.c
index 4bede85..48b4e91 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -110,12 +110,12 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type,
case CMARK_NODE_CUSTOM_BLOCK:
case CMARK_NODE_CUSTOM_INLINE:
cmark_strbuf_puts(xml, " on_enter=\"");
- escape_xml(xml, node->as.custom.on_enter.data,
- node->as.custom.on_enter.len);
+ escape_xml(xml, node->as.custom.on_enter,
+ strlen((char *)node->as.custom.on_enter));
cmark_strbuf_putc(xml, '"');
cmark_strbuf_puts(xml, " on_exit=\"");
- escape_xml(xml, node->as.custom.on_exit.data,
- node->as.custom.on_exit.len);
+ escape_xml(xml, node->as.custom.on_exit,
+ strlen((char *)node->as.custom.on_exit));
cmark_strbuf_putc(xml, '"');
break;
case CMARK_NODE_LINK: