Files
kryon/examples/package/markdown.c
T
2026-07-20 11:25:19 -03:00

19 lines
442 B
C

#include "kryon.h"
#include <stdio.h>
#include <string.h>
int main(void) {
const char *markdown = "# Kryon\n\n- [x] packaged\n";
char *html = KryonMarkdownToHTML(markdown, strlen(markdown), KRYON_MARKDOWN_GFM);
if (!html) {
return 1;
}
int ok = strstr(html, "<h1") != NULL && strstr(html, "<input") != NULL;
if (!ok) {
fputs(html, stderr);
}
KryonMarkdownFree(html);
return ok ? 0 : 1;
}