LOWDOWN_BUF(3)

NAME
lowdown_buf - parse a Markdown buffer into formatted output

LIBRARY
liblowdown

SYNOPSIS
#include <sys/queue.h>
#include <stdio.h>
#include <lowdown.h>
void
lowdown_buf(const struct lowdown_opts *opts, const char *buf, size_t bufsz, char **ret, size_t *retsz, struct lowdown_metaq *metaq);

DESCRIPTION
Parses a lowdown(5) buffer buf of size bufsz into an output buffer ret of size retsz according to a configuration opts. The output format is specified by opts->type. If LOWDOWN_SMARTY is set in opts->feat and metaq is not NULL, metaq is filled with metadata rendered in the given output format.

The caller is responsible for freeing ret and metaq.

SEE ALSO
lowdown(3), lowdown_metaq_free(3)

CAVEATS
This function will call exit(3) if internal memory allocation fails. There is no way to catch this condition.