From 294880e0118e27c97f26beaaa81a79de23f80727 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 15 Mar 2015 16:41:59 -0700 Subject: Added options parameter to cmark_markdown_to_html. --- api_test/cplusplus.cpp | 2 +- api_test/main.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'api_test') diff --git a/api_test/cplusplus.cpp b/api_test/cplusplus.cpp index b6228a3..5e8f722 100644 --- a/api_test/cplusplus.cpp +++ b/api_test/cplusplus.cpp @@ -8,7 +8,7 @@ void test_cplusplus(test_batch_runner *runner) { static const char md[] = "paragraph\n"; - char *html = cmark_markdown_to_html(md, sizeof(md) - 1); + char *html = cmark_markdown_to_html(md, sizeof(md) - 1, CMARK_OPT_DEFAULT); STR_EQ(runner, html, "

paragraph

\n", "libcmark works with C++"); free(html); } diff --git a/api_test/main.c b/api_test/main.c index d42cbaf..3390ac6 100644 --- a/api_test/main.c +++ b/api_test/main.c @@ -606,7 +606,8 @@ utf8(test_batch_runner *runner) // Test string containing null character static const char string_with_null[] = "((((\0))))"; char *html = cmark_markdown_to_html(string_with_null, - sizeof(string_with_null) - 1); + sizeof(string_with_null) - 1, + CMARK_OPT_DEFAULT); STR_EQ(runner, html, "

((((" UTF8_REPL "))))

\n", "utf8 with U+0000"); free(html); @@ -656,7 +657,8 @@ test_continuation_byte(test_batch_runner *runner, const char *utf8) } strcat(expected, "))))

\n"); - char *html = cmark_markdown_to_html(buf, strlen(buf)); + char *html = cmark_markdown_to_html(buf, strlen(buf), + CMARK_OPT_DEFAULT); STR_EQ(runner, html, expected, "invalid utf8 continuation byte %d/%d", pos, len); free(html); @@ -667,7 +669,8 @@ static void test_md_to_html(test_batch_runner *runner, const char *markdown, const char *expected_html, const char *msg) { - char *html = cmark_markdown_to_html(markdown, strlen(markdown)); + char *html = cmark_markdown_to_html(markdown, strlen(markdown), + CMARK_OPT_DEFAULT); STR_EQ(runner, html, expected_html, msg); free(html); } -- cgit v1.2.3