blob: 07b7c4cfc31115317ffbd99d1534086bcb4c72af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include "node.h"
#include "references.h"
#include "html/houdini.h"
#include "cmark.h"
#include "buffer.h"
char *cmark_markdown_to_html(unsigned char *text, int len)
{
cmark_node *blocks;
char *result;
blocks = cmark_parse_document(text, len);
result = cmark_render_html(blocks);
cmark_free_nodes(blocks);
return result;
}
|