summaryrefslogtreecommitdiff
path: root/src/cmark.c
blob: 1d7a500d6d73ec6b75c5fda225838f386b182224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include "node.h"
#include "houdini.h"
#include "cmark.h"
#include "buffer.h"

char *cmark_markdown_to_html(const char *text, int len)
{
	cmark_node *doc;
	char *result;

	doc = cmark_parse_document(text, len);

	result = cmark_render_html(doc, CMARK_OPT_DEFAULT);
	cmark_node_free(doc);

	return result;
}