From d348bf71f2139c0112db204acabe5fc3cf1c8173 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Wed, 11 Mar 2015 12:42:12 +0100 Subject: Update code examples in documentation Add new parser option argument. --- src/cmark.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cmark.h b/src/cmark.h index e29f28a..ffaca68 100644 --- a/src/cmark.h +++ b/src/cmark.h @@ -412,11 +412,11 @@ cmark_consolidate_text_nodes(cmark_node *root); * * Simple interface: * - * cmark_node *document = cmark_parse_document("Hello *world*", 12); + * cmark_node *document = cmark_parse_document("Hello *world*", 12, 0); * * Streaming interface: * - * cmark_parser *parser = cmark_parser_new(); + * cmark_parser *parser = cmark_parser_new(0); * FILE *fp = fopen("myfile.md", "r"); * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { * cmark_parser_feed(parser, buffer, bytes); -- cgit v1.2.3 From b4ed40eb4899afb59773ac1d3473f9603b3934a9 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Wed, 11 Mar 2015 19:18:18 +0100 Subject: Use CMARK_OPT_DEFAULT in code examples --- src/cmark.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cmark.h b/src/cmark.h index ffaca68..3c68ac6 100644 --- a/src/cmark.h +++ b/src/cmark.h @@ -412,11 +412,12 @@ cmark_consolidate_text_nodes(cmark_node *root); * * Simple interface: * - * cmark_node *document = cmark_parse_document("Hello *world*", 12, 0); + * cmark_node *document = cmark_parse_document("Hello *world*", 12, + * CMARK_OPT_DEFAULT); * * Streaming interface: * - * cmark_parser *parser = cmark_parser_new(0); + * cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT); * FILE *fp = fopen("myfile.md", "r"); * while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { * cmark_parser_feed(parser, buffer, bytes); -- cgit v1.2.3