Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 511dc808e4
19 lines (15 sloc) 0.375 kB
#include <stdio.h>
#include <stdlib.h>
#include "discount/markdown.h"
char* convert_markdown_to_string(const char *str)
{
char *out = NULL;
Document *blob = mkd_string((char *)str, strlen(str), 0);
mkd_compile(blob, 0);
int sz = mkd_document(blob, &out);
if(sz == 0)
return NULL;
else
out[sz - 1] = 0;
return out;
}
Jump to Line
Something went wrong with that request. Please try again.