Macaw OS C reference

Function markdown

#include <macaw.h>
int markdown(
    const char *text,
    char *html,
    int size,
    char *title,
    int tsize
);

Turns Markdown into HTML, and gives you its first heading to use as a title.

Parameters

textconst char *
The Markdown to turn into HTML.
htmlchar *
Where the HTML goes.
sizeint
How many bytes html holds. HTML that doesn't fit is cut short.
titlechar *
Where the first heading's text goes (empty if there isn't one), or NULL if you don't need it.
tsizeint
How many bytes title holds, or 0 with NULL.

Returns int

The whole HTML's length. If it's size or more, html was cut short.

In Markdown, with nothing else.