| 1 |
|
| #include "EXTERN.h" |
| 2 |
|
| #include "perl.h" |
| 3 |
|
| #include "XSUB.h" |
| 4 |
|
| |
| 5 |
|
| #include "ppport.h" |
| 6 |
|
| |
| 7 |
|
| #include <string.h> |
| 8 |
|
| #include <mkdio.h> |
| 9 |
|
| |
| 10 |
|
| #define MKD2_NOLINKS 0x00000001 |
| 11 |
|
| #define MKD2_NOIMAGE 0x00000002 |
| 12 |
|
| #define MKD2_NOPANTS 0x00000004 |
| 13 |
|
| #define MKD2_NOHTML 0x00000008 |
| 14 |
|
| #define MKD2_STRICT 0x00000010 |
| 15 |
|
| #define MKD2_TAGTEXT 0x00000020 |
| 16 |
|
| #define MKD2_NO_EXT 0x00000040 |
| 17 |
|
| #define MKD2_CDATA 0x00000080 |
| 18 |
|
| #define MKD2_NOSUPERSCRIPT 0x00000100 |
| 19 |
|
| #define MKD2_NORELAXED 0x00000200 |
| 20 |
|
| #define MKD2_NOTABLES 0x00000400 |
| 21 |
|
| #define MKD2_NOSTRIKETHROUGH 0x00000800 |
| 22 |
|
| #define MKD2_TOC 0x00001000 |
| 23 |
|
| #define MKD2_1_COMPAT 0x00002000 |
| 24 |
|
| #define MKD2_AUTOLINK 0x00004000 |
| 25 |
|
| #define MKD2_SAFELINK 0x00008000 |
| 26 |
|
| #define MKD2_NOHEADER 0x00010000 |
| 27 |
|
| #define MKD2_TABSTOP 0x00020000 |
| 28 |
|
| #define MKD2_NODIVQUOTE 0x00040000 |
| 29 |
|
| #define MKD2_NOALPHALIST 0x00080000 |
| 30 |
|
| #define MKD2_NODLIST 0x00100000 |
| 31 |
|
| #define MKD2_EXTRA_FOOTNOTE 0x00200000 |
| 32 |
|
| #define MKD2_NOSTYLE 0x00400000 |
| 33 |
|
| #define MKD2_NODLDISCOUNT 0x00800000 |
| 34 |
|
| #define MKD2_DLEXTRA 0x01000000 |
| 35 |
|
| #define MKD2_FENCEDCODE 0x02000000 |
| 36 |
|
| #define MKD2_IDANCHOR 0x04000000 |
| 37 |
|
| #define MKD2_GITHUBTAGS 0x08000000 |
| 38 |
|
| #define MKD2_URLENCODEDANCHOR 0x10000000 |
| 39 |
|
| #define MKD2_LATEX 0x40000000 |
| 40 |
|
| #define MKD2_EXPLICITLIST 0x80000000 |
| 41 |
|
| |
| 42 |
|
| #define MKD3_OPTION_NORMAL_LISTITEM 0x01 |
| 43 |
|
| #define MKD3_OPTION_ALT_AS_TITLE 0x02 |
| 44 |
|
| #define MKD3_OPTION_EXTENDED_ATTR 0x04 |
| 45 |
|
| |
| 46 |
|
| static mkd_flag_t * |
| 47 |
26 |
| legacy_flags(uint32_t bits) |
| 48 |
|
| { |
| 49 |
26 |
| mkd_flag_t *flags = mkd_flags(); |
| 50 |
|
| |
| 51 |
26 |
▶ | if (flags == NULL) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (flags == NULL) { |
0 |
26 |
26 |
|
| 52 |
0 |
| return NULL; |
| 53 |
|
| } |
| 54 |
|
| |
| 55 |
26 |
| mkd_set_flag_num(flags, MKD_DLDISCOUNT); |
| 56 |
26 |
| mkd_set_flag_num(flags, MKD_HTML5); |
| 57 |
|
| |
| 58 |
|
| #define SET_LEGACY_FLAG(bit, flag) \ |
| 59 |
|
| if (bits & (bit)) mkd_set_flag_num(flags, (flag)) |
| 60 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOLINKS, MKD_NOLINKS); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOLINKS, MKD_NOLINKS); |
0 |
26 |
26 |
|
| 61 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOIMAGE, MKD_NOIMAGE); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOIMAGE, MKD_NOIMAGE); |
0 |
26 |
26 |
|
| 62 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOPANTS, MKD_NOPANTS); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOPANTS, MKD_NOPANTS); |
25 |
1 |
26 |
|
| 63 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOHTML, MKD_NOHTML); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOHTML, MKD_NOHTML); |
0 |
26 |
26 |
|
| 64 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_STRICT, MKD_STRICT); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_STRICT, MKD_STRICT); |
0 |
26 |
26 |
|
| 65 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_TAGTEXT, MKD_TAGTEXT); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_TAGTEXT, MKD_TAGTEXT); |
0 |
26 |
26 |
|
| 66 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NO_EXT, MKD_NO_EXT); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NO_EXT, MKD_NO_EXT); |
0 |
26 |
26 |
|
| 67 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_CDATA, MKD_CDATA); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_CDATA, MKD_CDATA); |
0 |
26 |
26 |
|
| 68 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOSUPERSCRIPT, MKD_NOSUPERSCRIPT); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOSUPERSCRIPT, MKD_NOSUPERSCRIPT); |
0 |
26 |
26 |
|
| 69 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NORELAXED, MKD_STRICT); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NORELAXED, MKD_STRICT); |
0 |
26 |
26 |
|
| 70 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOTABLES, MKD_NOTABLES); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOTABLES, MKD_NOTABLES); |
0 |
26 |
26 |
|
| 71 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOSTRIKETHROUGH, MKD_NOSTRIKETHROUGH); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOSTRIKETHROUGH, MKD_NOSTRIKETHROUGH); |
0 |
26 |
26 |
|
| 72 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_TOC, MKD_TOC); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_TOC, MKD_TOC); |
0 |
26 |
26 |
|
| 73 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_1_COMPAT, MKD_1_COMPAT); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_1_COMPAT, MKD_1_COMPAT); |
0 |
26 |
26 |
|
| 74 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_AUTOLINK, MKD_AUTOLINK); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_AUTOLINK, MKD_AUTOLINK); |
1 |
25 |
26 |
|
| 75 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_SAFELINK, MKD_SAFELINK); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_SAFELINK, MKD_SAFELINK); |
0 |
26 |
26 |
|
| 76 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOHEADER, MKD_NOHEADER); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOHEADER, MKD_NOHEADER); |
24 |
2 |
26 |
|
| 77 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_TABSTOP, MKD_TABSTOP); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_TABSTOP, MKD_TABSTOP); |
0 |
26 |
26 |
|
| 78 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NODIVQUOTE, MKD_NODIVQUOTE); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NODIVQUOTE, MKD_NODIVQUOTE); |
0 |
26 |
26 |
|
| 79 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOALPHALIST, MKD_NOALPHALIST); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOALPHALIST, MKD_NOALPHALIST); |
0 |
26 |
26 |
|
| 80 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_EXTRA_FOOTNOTE, MKD_EXTRA_FOOTNOTE); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_EXTRA_FOOTNOTE, MKD_EXTRA_FOOTNOTE); |
0 |
26 |
26 |
|
| 81 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_NOSTYLE, MKD_NOSTYLE); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_NOSTYLE, MKD_NOSTYLE); |
0 |
26 |
26 |
|
| 82 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_DLEXTRA, MKD_DLEXTRA); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_DLEXTRA, MKD_DLEXTRA); |
23 |
3 |
26 |
|
| 83 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_FENCEDCODE, MKD_FENCEDCODE); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_FENCEDCODE, MKD_FENCEDCODE); |
22 |
4 |
26 |
|
| 84 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_IDANCHOR, MKD_IDANCHOR); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_IDANCHOR, MKD_IDANCHOR); |
0 |
26 |
26 |
|
| 85 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_GITHUBTAGS, MKD_GITHUBTAGS); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_GITHUBTAGS, MKD_GITHUBTAGS); |
0 |
26 |
26 |
|
| 86 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_URLENCODEDANCHOR, MKD_URLENCODEDANCHOR); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_URLENCODEDANCHOR, MKD_URLENCODEDANCHOR); |
0 |
26 |
26 |
|
| 87 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_LATEX, MKD_LATEX); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_LATEX, MKD_LATEX); |
0 |
26 |
26 |
|
| 88 |
26 |
▶ | SET_LEGACY_FLAG(MKD2_EXPLICITLIST, MKD_EXPLICITLIST); |
Branch: 1 branch
| Branch | True | False | Total |
| SET_LEGACY_FLAG(MKD2_EXPLICITLIST, MKD_EXPLICITLIST); |
1 |
25 |
26 |
|
| 89 |
|
| #undef SET_LEGACY_FLAG |
| 90 |
|
| |
| 91 |
26 |
▶ | if (bits & MKD2_NODLDISCOUNT) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (bits & MKD2_NODLDISCOUNT) { |
0 |
26 |
26 |
|
| 92 |
0 |
| mkd_clr_flag_num(flags, MKD_DLDISCOUNT); |
| 93 |
|
| } |
| 94 |
26 |
▶ | if (bits & MKD2_NODLIST) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (bits & MKD2_NODLIST) { |
1 |
25 |
26 |
|
| 95 |
1 |
| mkd_clr_flag_num(flags, MKD_DLDISCOUNT); |
| 96 |
1 |
| mkd_clr_flag_num(flags, MKD_DLEXTRA); |
| 97 |
|
| } |
| 98 |
|
| |
| 99 |
26 |
| return flags; |
| 100 |
|
| } |
| 101 |
|
| |
| 102 |
|
| static void |
| 103 |
26 |
| set_option_flags(mkd_flag_t *flags, uint32_t bits) |
| 104 |
|
| { |
| 105 |
26 |
▶ | if (bits & MKD3_OPTION_NORMAL_LISTITEM) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (bits & MKD3_OPTION_NORMAL_LISTITEM) { |
2 |
24 |
26 |
|
| 106 |
2 |
| mkd_set_flag_num(flags, MKD_NORMAL_LISTITEM); |
| 107 |
|
| } |
| 108 |
26 |
▶ | if (bits & MKD3_OPTION_ALT_AS_TITLE) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (bits & MKD3_OPTION_ALT_AS_TITLE) { |
1 |
25 |
26 |
|
| 109 |
1 |
| mkd_set_flag_num(flags, MKD_ALT_AS_TITLE); |
| 110 |
|
| } |
| 111 |
26 |
▶ | if (bits & MKD3_OPTION_EXTENDED_ATTR) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (bits & MKD3_OPTION_EXTENDED_ATTR) { |
2 |
24 |
26 |
|
| 112 |
2 |
| mkd_set_flag_num(flags, MKD_EXTENDED_ATTR); |
| 113 |
|
| } |
| 114 |
26 |
| } |
| 115 |
|
| |
| 116 |
|
| static SV * |
| 117 |
26 |
| render_markdown(SV *sv_str, uint32_t legacy_bits, uint32_t option_bits) |
| 118 |
|
| { |
| 119 |
26 |
| bool is_utf8 = SvUTF8(sv_str) != 0; /* SvUTF8 does not consistently cast to bool across architectures */ |
| 120 |
26 |
| char *text = SvPV_nolen(sv_str); |
| 121 |
26 |
| SV *result = &PL_sv_undef; |
| 122 |
26 |
| char *html = NULL; |
| 123 |
|
| int szhtml; |
| 124 |
|
| MMIOT *doc; |
| 125 |
|
| mkd_flag_t *discount_flags; |
| 126 |
|
| |
| 127 |
26 |
| discount_flags = legacy_flags(legacy_bits); |
| 128 |
26 |
▶ | if (discount_flags == NULL) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (discount_flags == NULL) { |
0 |
26 |
26 |
|
| 129 |
0 |
| croak("failed to allocate Discount flags"); |
| 130 |
|
| } |
| 131 |
26 |
| set_option_flags(discount_flags, option_bits); |
| 132 |
|
| |
| 133 |
26 |
▶ | if ((doc = mkd_string(text, strlen(text), discount_flags)) == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ((doc = mkd_string(text, strlen(text), discount_flags)) == 0) { |
0 |
26 |
26 |
|
| 134 |
0 |
| mkd_free_flags(discount_flags); |
| 135 |
0 |
| croak("failed at mkd_string"); |
| 136 |
|
| } |
| 137 |
|
| |
| 138 |
26 |
▶ | if (!mkd_compile(doc, discount_flags)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (!mkd_compile(doc, discount_flags)) { |
0 |
26 |
26 |
|
| 139 |
0 |
| mkd_cleanup(doc); |
| 140 |
0 |
| mkd_free_flags(discount_flags); |
| 141 |
0 |
| croak("failed at mkd_compile"); |
| 142 |
|
| } |
| 143 |
|
| |
| 144 |
26 |
▶ | if ((szhtml = mkd_document(doc, &html)) == EOF) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ((szhtml = mkd_document(doc, &html)) == EOF) { |
0 |
26 |
26 |
|
| 145 |
0 |
| mkd_cleanup(doc); |
| 146 |
0 |
| mkd_free_flags(discount_flags); |
| 147 |
0 |
| croak("failed at mkd_document"); |
| 148 |
|
| } |
| 149 |
|
| |
| 150 |
26 |
| result = newSVpvn(html, szhtml); |
| 151 |
26 |
▶ | if (szhtml == 0 || html[szhtml - 1] != '\n') { |
Branch: 2 branches
| Branch | True | False | Total |
| if (szhtml == 0 || html[szhtml - 1] != '\n') { |
24 |
2 |
26 |
| if (szhtml == 0 || html[szhtml - 1] != '\n') { |
17 |
7 |
24 |
|
| 152 |
19 |
| sv_catpv(result, "\n"); |
| 153 |
|
| } |
| 154 |
26 |
▶ | if (is_utf8) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (is_utf8) { |
3 |
23 |
26 |
|
| 155 |
3 |
| sv_utf8_decode(result); |
| 156 |
|
| } |
| 157 |
|
| |
| 158 |
26 |
| mkd_cleanup(doc); |
| 159 |
26 |
| mkd_free_flags(discount_flags); |
| 160 |
26 |
| return result; |
| 161 |
|
| } |
| 162 |
|
| |
| 163 |
|
| MODULE = Text::Markdown::Discount PACKAGE = Text::Markdown::Discount PREFIX = TextMarkdown_ |
| 164 |
|
| |
| 165 |
|
| PROTOTYPES: DISABLE |
| 166 |
|
| |
| 167 |
|
| BOOT: |
| 168 |
8 |
| HV* stash = gv_stashpvn("Text::Markdown::Discount", strlen("Text::Markdown::Discount"), TRUE); |
| 169 |
8 |
| newCONSTSUB(stash, "MKD_NOLINKS", newSVuv(MKD2_NOLINKS)); |
| 170 |
8 |
| newCONSTSUB(stash, "MKD_NOIMAGE", newSVuv(MKD2_NOIMAGE)); |
| 171 |
8 |
| newCONSTSUB(stash, "MKD_NOPANTS", newSVuv(MKD2_NOPANTS)); |
| 172 |
8 |
| newCONSTSUB(stash, "MKD_NOHTML", newSVuv(MKD2_NOHTML)); |
| 173 |
8 |
| newCONSTSUB(stash, "MKD_STRICT", newSVuv(MKD2_STRICT)); |
| 174 |
8 |
| newCONSTSUB(stash, "MKD_TAGTEXT", newSVuv(MKD2_TAGTEXT)); |
| 175 |
8 |
| newCONSTSUB(stash, "MKD_NO_EXT", newSVuv(MKD2_NO_EXT)); |
| 176 |
8 |
| newCONSTSUB(stash, "MKD_CDATA", newSVuv(MKD2_CDATA)); |
| 177 |
8 |
| newCONSTSUB(stash, "MKD_NOSUPERSCRIPT", newSVuv(MKD2_NOSUPERSCRIPT)); |
| 178 |
8 |
| newCONSTSUB(stash, "MKD_NORELAXED", newSVuv(MKD2_NORELAXED)); |
| 179 |
8 |
| newCONSTSUB(stash, "MKD_NOTABLES", newSVuv(MKD2_NOTABLES)); |
| 180 |
8 |
| newCONSTSUB(stash, "MKD_NOSTRIKETHROUGH", newSVuv(MKD2_NOSTRIKETHROUGH)); |
| 181 |
8 |
| newCONSTSUB(stash, "MKD_TOC", newSVuv(MKD2_TOC)); |
| 182 |
8 |
| newCONSTSUB(stash, "MKD_1_COMPAT", newSVuv(MKD2_1_COMPAT)); |
| 183 |
8 |
| newCONSTSUB(stash, "MKD_AUTOLINK", newSVuv(MKD2_AUTOLINK)); |
| 184 |
8 |
| newCONSTSUB(stash, "MKD_SAFELINK", newSVuv(MKD2_SAFELINK)); |
| 185 |
8 |
| newCONSTSUB(stash, "MKD_NOHEADER", newSVuv(MKD2_NOHEADER)); |
| 186 |
8 |
| newCONSTSUB(stash, "MKD_TABSTOP", newSVuv(MKD2_TABSTOP)); |
| 187 |
8 |
| newCONSTSUB(stash, "MKD_NODIVQUOTE", newSVuv(MKD2_NODIVQUOTE)); |
| 188 |
8 |
| newCONSTSUB(stash, "MKD_NOALPHALIST", newSVuv(MKD2_NOALPHALIST)); |
| 189 |
8 |
| newCONSTSUB(stash, "MKD_NODLIST", newSVuv(MKD2_NODLIST)); |
| 190 |
8 |
| newCONSTSUB(stash, "MKD_EXTRA_FOOTNOTE", newSVuv(MKD2_EXTRA_FOOTNOTE)); |
| 191 |
8 |
| newCONSTSUB(stash, "MKD_NOSTYLE", newSVuv(MKD2_NOSTYLE)); |
| 192 |
8 |
| newCONSTSUB(stash, "MKD_NODLDISCOUNT", newSVuv(MKD2_NODLDISCOUNT)); |
| 193 |
8 |
| newCONSTSUB(stash, "MKD_DLEXTRA", newSVuv(MKD2_DLEXTRA)); |
| 194 |
8 |
| newCONSTSUB(stash, "MKD_FENCEDCODE", newSVuv(MKD2_FENCEDCODE)); |
| 195 |
8 |
| newCONSTSUB(stash, "MKD_IDANCHOR", newSVuv(MKD2_IDANCHOR)); |
| 196 |
8 |
| newCONSTSUB(stash, "MKD_GITHUBTAGS", newSVuv(MKD2_GITHUBTAGS)); |
| 197 |
8 |
| newCONSTSUB(stash, "MKD_URLENCODEDANCHOR", newSVuv(MKD2_URLENCODEDANCHOR)); |
| 198 |
8 |
| newCONSTSUB(stash, "MKD_LATEX", newSVuv(MKD2_LATEX)); |
| 199 |
8 |
| newCONSTSUB(stash, "MKD_EXPLICITLIST", newSVuv(MKD2_EXPLICITLIST)); |
| 200 |
|
| |
| 201 |
|
| SV * |
| 202 |
|
| TextMarkdown__markdown(sv_str, flags) |
| 203 |
|
| SV *sv_str |
| 204 |
|
| UV flags; |
| 205 |
|
| CODE: |
| 206 |
19 |
| RETVAL = render_markdown(sv_str, (uint32_t)flags, 0); |
| 207 |
|
| OUTPUT: |
| 208 |
|
| RETVAL |
| 209 |
|
| |
| 210 |
|
| SV * |
| 211 |
|
| TextMarkdown__markdown_with_options(sv_str, flags, option_flags) |
| 212 |
|
| SV *sv_str |
| 213 |
|
| UV flags; |
| 214 |
|
| UV option_flags; |
| 215 |
|
| CODE: |
| 216 |
7 |
| RETVAL = render_markdown( |
| 217 |
|
| sv_str, |
| 218 |
|
| (uint32_t)flags, |
| 219 |
|
| (uint32_t)option_flags |
| 220 |
|
| ); |
| 221 |
|
| OUTPUT: |
| 222 |
|
| RETVAL |