aboutsummaryrefslogtreecommitdiff
path: root/src/cmark.h
blob: 07cee1439e40a57b5307017267dc804763943ee1 (plain)
  1. #ifndef _CMARK_H_
  2. #define _CMARK_H_
  3. #include <stdbool.h>
  4. #include <stdio.h>
  5. #include "buffer.h"
  6. #include "ast.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #define CMARK_VERSION "0.1"
  11. #define CMARK_CODE_INDENT 4
  12. #define CMARK_MAX_LINK_LABEL_LENGTH 1000
  13. cmark_node_block *cmark_parse_document(const unsigned char *buffer, size_t len);
  14. cmark_node_block *cmark_parse_file(FILE *f);
  15. void cmark_debug_print(cmark_node_block *root);
  16. void cmark_render_html(cmark_strbuf *html, cmark_node_block *root);
  17. unsigned char *cmark_markdown_to_html(unsigned char *text, int len);
  18. #ifndef CMARK_NO_SHORT_NAMES
  19. #define VERSION CMARK_VERSION
  20. #define CODE_INDENT CMARK_CODE_INDENT
  21. #define MAX_LINK_LABEL_LENGTH CMARK_MAX_LINK_LABEL_LENGTH
  22. #endif
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif