Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.607 kb
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"
#include <markdown_lib.h>
MODULE = Text::Markdown::PegMarkdown PACKAGE = Text::Markdown::PegMarkdown PREFIX = TextMarkdown_
PROTOTYPES: DISABLE
SV *
TextMarkdown__markdown(text)
char *text;
PREINIT:
SV* r = &PL_sv_undef;
char *out = NULL;
int extensions = 0;
int output_format = HTML_FORMAT;
CODE:
out = markdown_to_string(text, extensions, output_format);
r = newSVpvn(out, strlen(out));
Safefree(out);
RETVAL = r;
OUTPUT:
RETVAL
Jump to Line
Something went wrong with that request. Please try again.