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