summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-22 21:50:20 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-22 21:51:23 -0800
commit4296462bfe31c877f4826f5734813c88c7240770 (patch)
treeea1a278fa8a6ad3c0598034b284fea3681ebf189 /src
parente9a194371e1e7c62bf415fec4361efe6164ec409 (diff)
xml renderer - Added xmlns attribute to document node.
See jgm/CommonMark#87.
Diffstat (limited to 'src')
-rw-r--r--src/xml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xml.c b/src/xml.c
index d603ed1..7392c6e 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -50,6 +50,9 @@ static int S_render_node(cmark_node *node, cmark_event_type ev_type,
literal = false;
switch (node->type) {
+ case CMARK_NODE_DOCUMENT:
+ cmark_strbuf_puts(xml, " xmlns=\"http://commonmark.org/xml/\"");
+ break;
case CMARK_NODE_TEXT:
case CMARK_NODE_CODE:
case CMARK_NODE_HTML: