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