summaryrefslogtreecommitdiff
path: root/src/blocks.c
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2015-02-16 10:27:36 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2015-02-16 10:27:36 -0800
commit73f6a4c1dafeb59b3a9615e071afae2b516a03fc (patch)
tree110ccfac545b1fadda1d997d24742f78aee9a5dd /src/blocks.c
parent3c0b582b52021a6abea644f056a4da4301e2bc30 (diff)
Move normalization step from main to cmark_parser_finish.
Diffstat (limited to 'src/blocks.c')
-rw-r--r--src/blocks.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/blocks.c b/src/blocks.c
index f2e4e8e..7470389 100644
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -869,7 +869,13 @@ cmark_node *cmark_parser_finish(cmark_parser *parser)
}
finalize_document(parser);
+
+ if (parser->options & CMARK_OPT_NORMALIZE) {
+ cmark_consolidate_text_nodes(parser->root);
+ }
+
cmark_strbuf_free(parser->curline);
+
#if CMARK_DEBUG_NODES
if (cmark_node_check(parser->root, stderr)) {
abort();