aboutsummaryrefslogtreecommitdiff
path: root/src/cmark.c
blob: 140a14cbc27f3b0d961154a963f3403fc592d409 (plain)
  1. #include <stdlib.h>
  2. #include <assert.h>
  3. #include <stdio.h>
  4. #include "node.h"
  5. #include "html/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);
  14. cmark_node_free(doc);
  15. return result;
  16. }