aboutsummaryrefslogtreecommitdiff
path: root/src/cmark.h
blob: 7371d33b358afa933aac1a733af2a9f44d71e25c (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. __attribute__((visibility("default")))
  14. cmark_node_block *cmark_parse_document(const unsigned char *buffer, size_t len);
  15. __attribute__((visibility("default")))
  16. cmark_node_block *cmark_parse_file(FILE *f);
  17. __attribute__((visibility("default")))
  18. void cmark_debug_print(cmark_node_block *root);
  19. __attribute__((visibility("default")))
  20. void cmark_render_html(cmark_strbuf *html, cmark_node_block *root);
  21. __attribute__((visibility("default")))
  22. unsigned char *cmark_markdown_to_html(unsigned char *text, int len);
  23. #ifndef CMARK_NO_SHORT_NAMES
  24. #define VERSION CMARK_VERSION
  25. #define CODE_INDENT CMARK_CODE_INDENT
  26. #define MAX_LINK_LABEL_LENGTH CMARK_MAX_LINK_LABEL_LENGTH
  27. #endif
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif