aboutsummaryrefslogtreecommitdiff
path: root/src/cmark.c
blob: 945e392be663007757c860b1340d6f3e824e8e8f (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 *blocks;
  11. char *result;
  12. blocks = cmark_parse_document(text, len);
  13. result = cmark_render_html(blocks);
  14. cmark_free_nodes(blocks);
  15. return result;
  16. }