diff options
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/html.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/html/html.c b/src/html/html.c index cd02f83..faa570b 100644 --- a/src/html/html.c +++ b/src/html/html.c @@ -5,6 +5,7 @@ #include <assert.h> #include "cmark.h" +#include "buffer.h" #include "ast.h" #include "debug.h" #include "html/houdini.h" @@ -373,7 +374,12 @@ static void blocks_to_html(strbuf *html, node_block *b) free_render_stack(rstack); } -extern void cmark_render_html(strbuf *html, node_block *root) +unsigned char *cmark_render_html(node_block *root) { - blocks_to_html(html, root); + unsigned char *result; + strbuf html = GH_BUF_INIT; + blocks_to_html(&html, root); + result = strbuf_detach(&html); + strbuf_free(&html); + return result; } |