Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
607 B

#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