aboutsummaryrefslogtreecommitdiff
path: root/src/cmark.c
blob: 1d7a500d6d73ec6b75c5fda225838f386b182224 (plain)
  1. #include <stdlib.h>
  2. #include <assert.h>
  3. #include <stdio.h>
  4. #include "node.h"
  5. #include "houdini.h"
  6. #include "cmark.h"
  7. #include "buffer.h"
  8. char *cmark_markdown_to_html(const char *text, int len)
  9. {
  10. cmark_node *doc;
  11. char *result;
  12. doc = cmark_parse_document(text, len);
  13. result = cmark_render_html(doc, CMARK_OPT_DEFAULT);
  14. cmark_node_free(doc);
  15. return result;
  16. }