summaryrefslogtreecommitdiff
path: root/src/cmark.c
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-11-16 10:45:50 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-11-16 10:45:50 -0800
commit5a26ca5cf9481289ad77d6049b55c48feea7cc38 (patch)
tree561595c5de9009425a168a39d9f4f3060b82183d /src/cmark.c
parentb7f6e3f775705029df262aa313a0cd17ee3073cb (diff)
cmark_render_html now just returns a regular C string.
This way, we don't have to expose buffer.h; it is just used internally.
Diffstat (limited to 'src/cmark.c')
-rw-r--r--src/cmark.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cmark.c b/src/cmark.c
index 85e1adb..96b3080 100644
--- a/src/cmark.c
+++ b/src/cmark.c
@@ -11,17 +11,13 @@
unsigned char *cmark_markdown_to_html(unsigned char *text, int len)
{
node_block *blocks;
- strbuf htmlbuf = GH_BUF_INIT;
unsigned char *result;
blocks = cmark_parse_document(text, len);
- cmark_render_html(&htmlbuf, blocks);
+ result = cmark_render_html(blocks);
cmark_free_blocks(blocks);
- result = strbuf_detach(&htmlbuf);
- strbuf_free(&htmlbuf);
-
return result;
}