aboutsummaryrefslogtreecommitdiff
path: root/src/cmark.c
blob: 2ec9be9aeabb44ccf39fe07c12dbf249d1279a3b (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. const int cmark_version = CMARK_VERSION;
  9. const char cmark_version_string[] = CMARK_VERSION_STRING;
  10. char *cmark_markdown_to_html(const char *text, int len)
  11. {
  12. cmark_node *doc;
  13. char *result;
  14. doc = cmark_parse_document(text, len);
  15. result = cmark_render_html(doc, CMARK_OPT_DEFAULT);
  16. cmark_node_free(doc);
  17. return result;
  18. }