summaryrefslogtreecommitdiff
path: root/src/xml.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-28 17:00:15 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-28 17:00:15 -0800
commitb50a2cd618802543e01f46bffb4b19d5bd5b4ba6 (patch)
treea7e5013ad6fd1dc27bacada0b84b4b3991aacfae /src/xml.c
parent6f30b9fcabfacb2811cba6df20a49b90f44201a1 (diff)
Revamped xml writer and dtd to use lowercase element names.
Diffstat (limited to 'src/xml.c')
-rw-r--r--src/xml.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/xml.c b/src/xml.c
index 86fb6d4..1ec1d7d 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -45,7 +45,8 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
if (entering) {
indent(state);
- cmark_strbuf_printf(xml, "<%s", cmark_node_type_string(node));
+ cmark_strbuf_printf(xml, "<%s",
+ cmark_node_get_type_string(node));
if (node->start_line != 0) {
cmark_strbuf_printf(xml, " sourcepos=\"%d:%d-%d\"",
@@ -65,7 +66,8 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
escape_xml(xml, node->as.literal.data,
node->as.literal.len);
cmark_strbuf_puts(xml, "</");
- cmark_strbuf_puts(xml, cmark_node_type_string(node));
+ cmark_strbuf_puts(xml,
+ cmark_node_get_type_string(node));
literal = true;
break;
case CMARK_NODE_CODE_BLOCK:
@@ -79,7 +81,8 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
escape_xml(xml, node->as.code.literal.data,
node->as.code.literal.len);
cmark_strbuf_puts(xml, "</");
- cmark_strbuf_puts(xml, cmark_node_type_string(node));
+ cmark_strbuf_puts(xml,
+ cmark_node_get_type_string(node));
literal = true;
break;
case CMARK_NODE_LINK:
@@ -105,7 +108,8 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
state->indent -= 2;
}
indent(state);
- cmark_strbuf_printf(xml, "</%s", cmark_node_type_string(node));
+ cmark_strbuf_printf(xml, "</%s",
+ cmark_node_get_type_string(node));
}
// TODO print attributes