summaryrefslogtreecommitdiff
path: root/src/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml.c')
-rw-r--r--src/xml.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xml.c b/src/xml.c
index 2ae900c..93a6eda 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -123,6 +123,11 @@ char *cmark_render_xml(cmark_node *root, long options)
cmark_event_type ev_type;
cmark_node *cur;
struct render_state state = { &xml, 0 };
+
+ if (options & CMARK_OPT_NORMALIZE) {
+ cmark_consolidate_text_nodes(root);
+ }
+
cmark_iter *iter = cmark_iter_new(root);
cmark_strbuf_puts(state.xml,