blob: e38e03a8a91afb31a37de50ac26eb0bd7835d781 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*
* file : tests/basic/driver.c
* copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
* license : FreeBSD License; see accompanying COPYING file
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <cmark-gfm.h>
#include <cmark-gfm-extension_api.h>
int
main (int argc, const char* argv[])
{
assert (argc == 2);
const char* from = argv[1];
char* to = cmark_markdown_to_html (from,
strlen (from),
CMARK_OPT_DEFAULT |
CMARK_OPT_VALIDATE_UTF8);
printf ("%s", to);
cmark_get_default_mem_allocator ()->free (to);
return 0;
}
|