#ifndef UNDOC_H
#define UNDOC_H
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct UndocDocument UndocDocument;
#define UNDOC_FLAG_FRONTMATTER 1
#define UNDOC_FLAG_ESCAPE_SPECIAL 2
#define UNDOC_FLAG_PARAGRAPH_SPACING 4
#define UNDOC_JSON_PRETTY 0
#define UNDOC_JSON_COMPACT 1
const char* undoc_version(void);
const char* undoc_last_error(void);
UndocDocument* undoc_parse_file(const char* path);
UndocDocument* undoc_parse_bytes(const uint8_t* data, size_t len);
void undoc_free_document(UndocDocument* doc);
char* undoc_to_markdown(const UndocDocument* doc, int flags);
char* undoc_to_text(const UndocDocument* doc);
char* undoc_to_json(const UndocDocument* doc, int format);
char* undoc_plain_text(const UndocDocument* doc);
int undoc_section_count(const UndocDocument* doc);
int undoc_resource_count(const UndocDocument* doc);
char* undoc_get_title(const UndocDocument* doc);
char* undoc_get_author(const UndocDocument* doc);
void undoc_free_string(char* str);
#ifdef __cplusplus
}
#endif
#endif