| lib/Markdown/Simple.xs | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| branch | 369 | 586 | 62.9 |
| line | true | false | branch |
|---|---|---|---|
| 26 | 1335 | 81 | while (*p) { |
| 28 | 9 | 1326 | if (c >= 0x80) { |
| 31 | 8 | 1 | if ((c & 0xE0) == 0xC0) len = 2; |
| 32 | 0 | 1 | else if ((c & 0xF0) == 0xE0) len = 3; |
| 33 | 1 | 0 | else if ((c & 0xF8) == 0xF0) len = 4; |
| 37 | 8 | 1 | if (len == 2 && (p[1] & 0xC0) == 0x80) { |
| 8 | 0 | if (len == 2 && (p[1] & 0xC0) == 0x80) { | |
| 39 | 0 | 1 | } else if (len == 3 && (p[1] & 0xC0) == 0x80 && (p[2] & 0xC0) == 0x80) { |
| 0 | 0 | } else if (len == 3 && (p[1] & 0xC0) == 0x80 && (p[2] & 0xC0) == 0x80) { | |
| 0 | 0 | } else if (len == 3 && (p[1] & 0xC0) == 0x80 && (p[2] & 0xC0) == 0x80) { | |
| 41 | 1 | 0 | } else if (len == 4 && (p[1] & 0xC0) == 0x80 && (p[2] & 0xC0) == 0x80 && (p[3] & 0xC0) == 0x80) { |
| 1 | 0 | } else if (len == 4 && (p[1] & 0xC0) == 0x80 && (p[2] & 0xC0) == 0x80 && (p[3] & 0xC0) == 0x80) { | |
| 1 | 0 | } else if (len == 4 && (p[1] & 0xC0) == 0x80 && (p[2] & 0xC0) == 0x80 && (p[3] & 0xC0) == 0x80) { | |
| 1 | 0 | } else if (len == 4 && (p[1] & 0xC0) == 0x80 && (p[2] & 0xC0) == 0x80 && (p[3] & 0xC0) == 0x80) { | |
| 59 | 81 | 0 | if (opts->enable_preprocess) { |
| 62 | 1384 | 81 | while (*q) { |
| 63 | 0 | 1384 | if (*q == '\r' && *(q+1) == '\n') { |
| 0 | 0 | if (*q == '\r' && *(q+1) == '\n') { | |
| 76 | 383 | 81 | while (*p) { |
| 78 | 383 | 0 | if (opts->enable_fenced_code && *p == '`' && *(p+1) == '`' && *(p+2) == '`') { |
| 4 | 379 | if (opts->enable_fenced_code && *p == '`' && *(p+1) == '`' && *(p+2) == '`') { | |
| 2 | 2 | if (opts->enable_fenced_code && *p == '`' && *(p+1) == '`' && *(p+2) == '`') { | |
| 2 | 0 | if (opts->enable_fenced_code && *p == '`' && *(p+1) == '`' && *(p+2) == '`') { | |
| 82 | 12 | 0 | while (*p && *p != '\n' && *p != ' ') p++; |
| 10 | 2 | while (*p && *p != '\n' && *p != ' ') p++; | |
| 10 | 0 | while (*p && *p != '\n' && *p != ' ') p++; | |
| 84 | 2 | 0 | while (*p && *p != '\n') p++; |
| 0 | 2 | while (*p && *p != '\n') p++; | |
| 88 | 2 | 0 | int code_len = fence ? (int)(fence - code_start) : (int)strlen(code_start); |
| 89 | 1 | 1 | if (lang_len > 0) { |
| 94 | 2 | 0 | if (fence) p = fence + 3; |
| 98 | 381 | 0 | if (opts->enable_strikethrough && *p == '~' && *(p+1) == '~') { |
| 8 | 373 | if (opts->enable_strikethrough && *p == '~' && *(p+1) == '~') { | |
| 8 | 0 | if (opts->enable_strikethrough && *p == '~' && *(p+1) == '~') { | |
| 101 | 63 | 0 | while (*p && !(*p == '~' && *(p+1) == '~')) p++; |
| 55 | 8 | while (*p && !(*p == '~' && *(p+1) == '~')) p++; | |
| 0 | 8 | while (*p && !(*p == '~' && *(p+1) == '~')) p++; | |
| 103 | 8 | 0 | if (*p == '~' && *(p+1) == '~') p += 2; |
| 8 | 0 | if (*p == '~' && *(p+1) == '~') p += 2; | |
| 107 | 365 | 8 | if (opts->enable_headers && *p == '#' && (*(p+1) == ' ' || *(p+1) == '#')) { |
| 8 | 357 | if (opts->enable_headers && *p == '#' && (*(p+1) == ' ' || *(p+1) == '#')) { | |
| 5 | 3 | if (opts->enable_headers && *p == '#' && (*(p+1) == ' ' || *(p+1) == '#')) { | |
| 4 | 1 | if (opts->enable_headers && *p == '#' && (*(p+1) == ' ' || *(p+1) == '#')) { | |
| 109 | 13 | 7 | while (*p == '#') { level++; p++; } |
| 110 | 7 | 0 | if (*p == ' ') p++; |
| 112 | 102 | 3 | while (*p && *p != '\n') p++; |
| 98 | 4 | while (*p && *p != '\n') p++; | |
| 114 | 4 | 3 | if (*p == '\n') p++; |
| 118 | 366 | 0 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { |
| 5 | 361 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { | |
| 5 | 0 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { | |
| 2 | 3 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { | |
| 1 | 1 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { | |
| 0 | 1 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { | |
| 0 | 0 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { | |
| 2 | 0 | if (opts->enable_tasklist && *p == '-' && *(p+1) == ' ' && *(p+2) == '[' && (*(p+3) == ' ' || *(p+3) == 'x' || *(p+3) == 'X') && *(p+4) == ']') { | |
| 119 | 1 | 1 | int checked = (*(p+3) == 'x' || *(p+3) == 'X'); |
| 0 | 1 | int checked = (*(p+3) == 'x' || *(p+3) == 'X'); | |
| 121 | 2 | 0 | if (*p == ' ') p++; |
| 123 | 26 | 2 | while (*p && *p != '\n') p++; |
| 26 | 0 | while (*p && *p != '\n') p++; | |
| 124 | 1 | 1 | sv_catpvf(out, " |
| 125 | 0 | 2 | if (*p == '\n') p++; |
| 129 | 364 | 0 | if (opts->enable_tables && *p == '|' && strchr(p, '\n')) { |
| 6 | 358 | if (opts->enable_tables && *p == '|' && strchr(p, '\n')) { | |
| 3 | 3 | if (opts->enable_tables && *p == '|' && strchr(p, '\n')) { | |
| 133 | 0 | 3 | if (!nl) break; |
| 135 | 3 | 0 | if (*sep == '|') { |
| 137 | 3 | 0 | if (sep_nl && strstr(sep, "---") < sep_nl) { |
| 3 | 0 | if (sep_nl && strstr(sep, "---") < sep_nl) { | |
| 141 | 7 | 3 | while (cell < nl) { |
| 143 | 7 | 0 | if (!pipe || pipe > nl) pipe = nl; |
| 0 | 7 | if (!pipe || pipe > nl) pipe = nl; | |
| 144 | 2 | 7 | while (*cell == ' ') cell++; |
| 146 | 9 | 0 | while (cell_end > cell && (*(cell_end-1) == ' ')) cell_end--; |
| 2 | 7 | while (cell_end > cell && (*(cell_end-1) == ' ')) cell_end--; | |
| 154 | 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
| 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 168 | 3 | 2 | while (*row == '|' && row) { |
| 3 | 0 | while (*row == '|' && row) { | |
| 170 | 1 | 2 | if (!row_nl) row_nl = row + strlen(row); |
| 173 | 7 | 3 | while (cell < row_nl) { |
| 175 | 7 | 0 | if (!pipe || pipe > row_nl) pipe = row_nl; |
| 0 | 7 | if (!pipe || pipe > row_nl) pipe = row_nl; | |
| 176 | 2 | 7 | while (*cell == ' ') cell++; |
| 178 | 13 | 0 | while (cell_end > cell && (*(cell_end-1) == ' ')) cell_end--; |
| 6 | 7 | while (cell_end > cell && (*(cell_end-1) == ' ')) cell_end--; | |
| 186 | 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
| 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 198 | 1 | 2 | if (*row_nl == '\0') break; |
| 208 | 353 | 8 | if (opts->enable_bold && ( |
| 209 | 26 | 327 | (*p == '*' && *(p+1) == '*') || |
| 16 | 10 | (*p == '*' && *(p+1) == '*') || | |
| 210 | 18 | 325 | (*p == '_' && *(p+1) == '_') |
| 9 | 9 | (*p == '_' && *(p+1) == '_') | |
| 214 | 98 | 0 | while (*p && !( |
| 215 | 10 | 88 | ((*p == '*' && *(p+1) == '*')) || |
| 0 | 10 | ((*p == '*' && *(p+1) == '*')) || | |
| 216 | 79 | 9 | ((*p == '_' && *(p+1) == '_')) |
| 0 | 9 | ((*p == '_' && *(p+1) == '_')) | |
| 219 | 10 | 9 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) p += 2; |
| 0 | 10 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) p += 2; | |
| 9 | 0 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) p += 2; | |
| 9 | 0 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) p += 2; | |
| 223 | 326 | 16 | if (opts->enable_italic && ((*p == '*' && *(p+1) != ' ') || (*p == '_' && *(p+1) != ' '))) { |
| 14 | 312 | if (opts->enable_italic && ((*p == '*' && *(p+1) != ' ') || (*p == '_' && *(p+1) != ' '))) { | |
| 4 | 10 | if (opts->enable_italic && ((*p == '*' && *(p+1) != ' ') || (*p == '_' && *(p+1) != ' '))) { | |
| 9 | 307 | if (opts->enable_italic && ((*p == '*' && *(p+1) != ' ') || (*p == '_' && *(p+1) != ' '))) { | |
| 9 | 0 | if (opts->enable_italic && ((*p == '*' && *(p+1) != ' ') || (*p == '_' && *(p+1) != ' '))) { | |
| 227 | 134 | 0 | while (*p && *p != end_marker) p++; |
| 115 | 19 | while (*p && *p != end_marker) p++; | |
| 229 | 19 | 0 | if (*p == end_marker) p++; |
| 233 | 323 | 0 | if (opts->enable_code && *p == '`') { |
| 2 | 321 | if (opts->enable_code && *p == '`') { | |
| 236 | 10 | 0 | while (*p && *p != '`') p++; |
| 8 | 2 | while (*p && *p != '`') p++; | |
| 238 | 2 | 0 | if (*p == '`') p++; |
| 242 | 321 | 0 | if (opts->enable_images && *p == '!' && *(p+1) == '[') { |
| 1 | 320 | if (opts->enable_images && *p == '!' && *(p+1) == '[') { | |
| 1 | 0 | if (opts->enable_images && *p == '!' && *(p+1) == '[') { | |
| 245 | 9 | 0 | while (*p && *p != ']') p++; |
| 8 | 1 | while (*p && *p != ']') p++; | |
| 247 | 1 | 0 | if (*p == ']') p++; |
| 248 | 1 | 0 | if (*p == '(') { |
| 251 | 10 | 0 | while (*p && *p != ')') p++; |
| 9 | 1 | while (*p && *p != ')') p++; | |
| 254 | 1 | 0 | if (*p == ')') p++; |
| 259 | 320 | 0 | if (opts->enable_links && *p == '[') { |
| 1 | 319 | if (opts->enable_links && *p == '[') { | |
| 262 | 10 | 0 | while (*p && *p != ']') p++; |
| 9 | 1 | while (*p && *p != ']') p++; | |
| 264 | 1 | 0 | if (*p == ']') p++; |
| 265 | 1 | 0 | if (*p == '(') { |
| 268 | 19 | 0 | while (*p && *p != ')') p++; |
| 18 | 1 | while (*p && *p != ')') p++; | |
| 271 | 1 | 0 | if (*p == ')') p++; |
| 277 | 319 | 0 | if (opts->enable_ordered_lists && |
| 265 | 54 | if (opts->enable_ordered_lists && | |
| 278 | 17 | 248 | (p == input || *(p-1) == '\n') && |
| 279 | 42 | 29 | *p >= '1' && *p <= '9' && |
| 3 | 39 | *p >= '1' && *p <= '9' && | |
| 280 | 0 | 3 | (*(p+1) == '.' || *(p+1) == ')')) { |
| 0 | 0 | (*(p+1) == '.' || *(p+1) == ')')) { | |
| 282 | 7 | 0 | while (opts->enable_ordered_lists && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { |
| 7 | 0 | while (opts->enable_ordered_lists && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 7 | 0 | while (opts->enable_ordered_lists && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 7 | 0 | while (opts->enable_ordered_lists && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 0 | 0 | while (opts->enable_ordered_lists && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 284 | 7 | 0 | if (*p == ' ') p++; // Skip space |
| 286 | 67 | 1 | while (*p && *p != '\n') p++; |
| 61 | 6 | while (*p && *p != '\n') p++; | |
| 294 | 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
| 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 7 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 303 | 6 | 1 | if (*p == '\n') p++; |
| 306 | 0 | 7 | while (*lookahead == '\n') lookahead++; |
| 307 | 4 | 3 | if (!(*lookahead >= '1' && *lookahead <= '9' && (*(lookahead+1) == '.' || *(lookahead+1) == ')'))) |
| 4 | 0 | if (!(*lookahead >= '1' && *lookahead <= '9' && (*(lookahead+1) == '.' || *(lookahead+1) == ')'))) | |
| 0 | 4 | if (!(*lookahead >= '1' && *lookahead <= '9' && (*(lookahead+1) == '.' || *(lookahead+1) == ')'))) | |
| 0 | 0 | if (!(*lookahead >= '1' && *lookahead <= '9' && (*(lookahead+1) == '.' || *(lookahead+1) == ')'))) | |
| 316 | 300 | 16 | if (opts->enable_unordered_lists && |
| 249 | 51 | if (opts->enable_unordered_lists && | |
| 317 | 15 | 234 | (p == input || *(p-1) == '\n') && |
| 318 | 63 | 3 | (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { |
| 59 | 4 | (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { | |
| 0 | 59 | (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { | |
| 7 | 0 | (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { | |
| 320 | 16 | 0 | while (opts->enable_unordered_lists && (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { |
| 10 | 6 | while (opts->enable_unordered_lists && (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { | |
| 0 | 10 | while (opts->enable_unordered_lists && (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { | |
| 0 | 0 | while (opts->enable_unordered_lists && (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { | |
| 14 | 2 | while (opts->enable_unordered_lists && (*p == '-' || *p == '*' || *p == '+') && (*(p+1) == ' ')) { | |
| 322 | 14 | 0 | if (*p == ' ') p++; // Skip space |
| 324 | 129 | 2 | while (*p && *p != '\n') p++; |
| 117 | 12 | while (*p && *p != '\n') p++; | |
| 334 | 14 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
| 14 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 14 | 0 | if (html_len > 11 && strncmp(html_str, " ", 5) == 0 && strncmp(html_str + html_len - 6, " ", 6) == 0) { |
|
| 343 | 12 | 2 | if (*p == '\n') p++; |
| 346 | 0 | 14 | while (*lookahead == '\n') lookahead++; |
| 347 | 11 | 3 | if (!(*lookahead == '-' || *lookahead == '*' || *lookahead == '+')) |
| 5 | 6 | if (!(*lookahead == '-' || *lookahead == '*' || *lookahead == '+')) | |
| 5 | 0 | if (!(*lookahead == '-' || *lookahead == '*' || *lookahead == '+')) | |
| 366 | 2575 | 81 | while (*scan) { |
| 367 | 9 | 2566 | if (scan[0] == '&' && scan[1] == '#' && scan[2] == 'x') { |
| 9 | 0 | if (scan[0] == '&' && scan[1] == '#' && scan[2] == 'x') { | |
| 9 | 0 | if (scan[0] == '&' && scan[1] == '#' && scan[2] == 'x') { | |
| 369 | 9 | 0 | if (semi && semi - scan < 10) { |
| 9 | 0 | if (semi && semi - scan < 10) { | |
| 371 | 9 | 0 | if (sscanf(scan + 3, "%X", &codepoint) == 1) { |
| 375 | 0 | 9 | if (codepoint <= 0x7F) { |
| 378 | 8 | 1 | } else if (codepoint <= 0x7FF) { |
| 382 | 0 | 1 | } else if (codepoint <= 0xFFFF) { |
| 387 | 1 | 0 | } else if (codepoint <= 0x10FFFF) { |
| 408 | 8 | 81 | while ((end = strstr(start, "\n\n"))) { |
| 410 | 8 | 0 | if (part_len > 0) { |
| 415 | 80 | 1 | if (*start) { |
| 423 | 3527 | 81 | for (STRLEN i = 0; i < final_len; ) { |
| 425 | 3453 | 74 | if (!in_code && i + 5 < final_len && strncmp(final_html + i, " |
| 3048 | 405 | if (!in_code && i + 5 < final_len && strncmp(final_html + i, " | |
| 2 | 3046 | if (!in_code && i + 5 < final_len && strncmp(final_html + i, " | |
| 429 | 76 | 3451 | if (in_code && i + 13 < final_len && strncmp(final_html + i, "", 13) == 0) { |
| 76 | 0 | if (in_code && i + 13 < final_len && strncmp(final_html + i, "", 13) == 0) { | |
| 2 | 74 | if (in_code && i + 13 < final_len && strncmp(final_html + i, "", 13) == 0) { | |
| 434 | 9 | 3518 | if (c >= 0x80) { |
| 435 | 8 | 1 | if ((c & 0xE0) == 0xC0) char_len = 2; |
| 436 | 0 | 1 | else if ((c & 0xF0) == 0xE0) char_len = 3; |
| 437 | 1 | 0 | else if ((c & 0xF8) == 0xF0) char_len = 4; |
| 439 | 3453 | 74 | if (in_code || (final_html[i] != '\n' && final_html[i] != '\r')) { |
| 3378 | 75 | if (in_code || (final_html[i] != '\n' && final_html[i] != '\r')) { | |
| 3378 | 0 | if (in_code || (final_html[i] != '\n' && final_html[i] != '\r')) { | |
| 456 | 132 | 2 | while (*p) { |
| 458 | 130 | 2 | if ((p == input || *(p-1) == '\n') && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { |
| 14 | 116 | if ((p == input || *(p-1) == '\n') && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 4 | 12 | if ((p == input || *(p-1) == '\n') && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 0 | 4 | if ((p == input || *(p-1) == '\n') && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 0 | 0 | if ((p == input || *(p-1) == '\n') && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 0 | 0 | if ((p == input || *(p-1) == '\n') && *p >= '1' && *p <= '9' && (*(p+1) == '.' || *(p+1) == ')')) { | |
| 463 | 0 | 0 | if (*p == ' ') p++; |
| 467 | 130 | 2 | if ((p == input || *(p-1) == '\n') && (*p == '-' || *p == '*' || *p == '+') && *(p+1) == ' ') { |
| 14 | 116 | if ((p == input || *(p-1) == '\n') && (*p == '-' || *p == '*' || *p == '+') && *(p+1) == ' ') { | |
| 16 | 0 | if ((p == input || *(p-1) == '\n') && (*p == '-' || *p == '*' || *p == '+') && *(p+1) == ' ') { | |
| 13 | 3 | if ((p == input || *(p-1) == '\n') && (*p == '-' || *p == '*' || *p == '+') && *(p+1) == ' ') { | |
| 0 | 13 | if ((p == input || *(p-1) == '\n') && (*p == '-' || *p == '*' || *p == '+') && *(p+1) == ' ') { | |
| 2 | 1 | if ((p == input || *(p-1) == '\n') && (*p == '-' || *p == '*' || *p == '+') && *(p+1) == ' ') { | |
| 474 | 12 | 118 | if (*p == '|') { |
| 480 | 15 | 103 | if (*p == '-' && ((p > input && *(p-1) == '|') || (p == input))) { |
| 15 | 0 | if (*p == '-' && ((p > input && *(p-1) == '|') || (p == input))) { | |
| 12 | 3 | if (*p == '-' && ((p > input && *(p-1) == '|') || (p == input))) { | |
| 0 | 12 | if (*p == '-' && ((p > input && *(p-1) == '|') || (p == input))) { | |
| 486 | 4 | 111 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) { |
| 0 | 4 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) { | |
| 10 | 101 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) { | |
| 6 | 4 | if ((*p == '*' && *(p+1) == '*') || (*p == '_' && *(p+1) == '_')) { | |
| 491 | 105 | 0 | if (*p == '*' || *p == '_') { |
| 4 | 101 | if (*p == '*' || *p == '_') { | |
| 496 | 0 | 101 | if (*p == '~' && *(p+1) == '~') { |
| 0 | 0 | if (*p == '~' && *(p+1) == '~') { | |
| 501 | 0 | 101 | if (*p == '`') { |
| 502 | 0 | 0 | if (*(p+1) == '`' && *(p+2) == '`') { |
| 0 | 0 | if (*(p+1) == '`' && *(p+2) == '`') { | |
| 506 | 0 | 0 | if (fence) { |
| 514 | 0 | 0 | while (*p && *p != '`') p++; |
| 0 | 0 | while (*p && *p != '`') p++; | |
| 515 | 0 | 0 | if (*p == '`') p++; |
| 520 | 0 | 101 | if (*p == '!' && *(p+1) == '[') { |
| 0 | 0 | if (*p == '!' && *(p+1) == '[') { | |
| 522 | 0 | 0 | while (*p && *p != ']') p++; |
| 0 | 0 | while (*p && *p != ']') p++; | |
| 523 | 0 | 0 | if (*p == ']') p++; |
| 524 | 0 | 0 | if (*p == '(') { |
| 526 | 0 | 0 | while (*p && *p != ')') p++; |
| 0 | 0 | while (*p && *p != ')') p++; | |
| 527 | 0 | 0 | if (*p == ')') p++; |
| 532 | 0 | 101 | if (*p == '[') { |
| 535 | 0 | 0 | while (*p && *p != ']') p++; |
| 0 | 0 | while (*p && *p != ']') p++; | |
| 537 | 0 | 0 | if (text_len > 0) |
| 539 | 0 | 0 | if (*p == ']') p++; |
| 540 | 0 | 0 | if (*p == '(') { |
| 542 | 0 | 0 | while (*p && *p != ')') p++; |
| 0 | 0 | while (*p && *p != ')') p++; | |
| 543 | 0 | 0 | if (*p == ')') p++; |
| 548 | 3 | 98 | if (*p == '#') { |
| 549 | 3 | 3 | while (*p == '#') p++; |
| 550 | 3 | 0 | if (*p == ' ') p++; |
| 554 | 0 | 98 | if (*p == '[' && (*(p+1) == ' ' || *(p+1) == 'x' || *(p+1) == 'X') && *(p+2) == ']') { |
| 0 | 0 | if (*p == '[' && (*(p+1) == ' ' || *(p+1) == 'x' || *(p+1) == 'X') && *(p+2) == ']') { | |
| 0 | 0 | if (*p == '[' && (*(p+1) == ' ' || *(p+1) == 'x' || *(p+1) == 'X') && *(p+2) == ']') { | |
| 0 | 0 | if (*p == '[' && (*(p+1) == ' ' || *(p+1) == 'x' || *(p+1) == 'X') && *(p+2) == ']') { | |
| 0 | 0 | if (*p == '[' && (*(p+1) == ' ' || *(p+1) == 'x' || *(p+1) == 'X') && *(p+2) == ']') { | |
| 556 | 0 | 0 | if (*p == ' ') p++; |
| 584 | 3 | 29 | if (items > 1 && SvOK(ST(1)) && SvROK(ST(1)) && SvTYPE(SvRV(ST(1))) == SVt_PVHV) { |
| 3 | 0 | if (items > 1 && SvOK(ST(1)) && SvROK(ST(1)) && SvTYPE(SvRV(ST(1))) == SVt_PVHV) { | |
| 3 | 0 | if (items > 1 && SvOK(ST(1)) && SvROK(ST(1)) && SvTYPE(SvRV(ST(1))) == SVt_PVHV) { | |
| 3 | 0 | if (items > 1 && SvOK(ST(1)) && SvROK(ST(1)) && SvTYPE(SvRV(ST(1))) == SVt_PVHV) { | |
| 586 | 1 | 2 | if ((val = hv_fetch(options, "headers", 7, 0)) && SvOK(*val)) opts.enable_headers = SvTRUE(*val); |
| 1 | 0 | if ((val = hv_fetch(options, "headers", 7, 0)) && SvOK(*val)) opts.enable_headers = SvTRUE(*val); | |
| 587 | 1 | 2 | if ((val = hv_fetch(options, "bold", 4, 0)) && SvOK(*val)) opts.enable_bold = SvTRUE(*val); |
| 1 | 0 | if ((val = hv_fetch(options, "bold", 4, 0)) && SvOK(*val)) opts.enable_bold = SvTRUE(*val); | |
| 588 | 2 | 1 | if (val = hv_fetch(options, "italic", 6, 0)) opts.enable_italic = SvTRUE(*val); |
| 589 | 0 | 3 | if (val = hv_fetch(options, "links", 5, 0)) opts.enable_links = SvTRUE(*val); |
| 590 | 0 | 3 | if (val = hv_fetch(options, "images", 6, 0)) opts.enable_images = SvTRUE(*val); |
| 591 | 0 | 3 | if (val = hv_fetch(options, "code", 4, 0)) opts.enable_code = SvTRUE(*val); |
| 592 | 0 | 3 | if (val = hv_fetch(options, "tables", 6, 0)) opts.enable_tables = SvTRUE(*val); |
| 593 | 0 | 3 | if (val = hv_fetch(options, "tasklist", 8, 0)) opts.enable_tasklist = SvTRUE(*val); |
| 594 | 0 | 3 | if (val = hv_fetch(options, "fenced_code", 11, 0)) opts.enable_fenced_code = SvTRUE(*val); |
| 595 | 0 | 3 | if (val = hv_fetch(options, "strikethrough", 13, 0)) opts.enable_strikethrough = SvTRUE(*val); |
| 596 | 0 | 3 | if (val = hv_fetch(options, "ordered_lists", 13, 0)) opts.enable_ordered_lists = SvTRUE(*val); |
| 597 | 2 | 1 | if (val = hv_fetch(options, "unordered_lists", 15, 0)) opts.enable_unordered_lists = SvTRUE(*val); |
| 598 | 0 | 3 | if (val = hv_fetch(options, "preprocess", 10, 0)) opts.enable_preprocess = SvTRUE(*val); |