Branch Coverage

lib/Text/Markdown/gen.callback.c
Criterion Covered Total %
branch 104 682 15.2


line true false branch
6 0 0 if (!rcb) { return; }
8 0 0 CB_HEADER("blockcode");
10 0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
12 0 0 PUSHBUF(lang);
0 0 PUSHBUF(lang);
0 0 PUSHBUF(lang);
14 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
21 0 0 if (!rcb) { return; }
23 0 0 CB_HEADER("blockquote");
25 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
27 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
34 1 0 if (!rcb) { return; }
36 0 1 CB_HEADER("header");
38 1 0 PUSHBUF(content);
0 1 PUSHBUF(content);
0 0 PUSHBUF(content);
40 0 1 mXPUSHi(level);
42 1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
49 0 0 if (!rcb) { return; }
51 0 0 CB_HEADER("hrule");
53 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
60 0 0 if (!rcb) { return; }
62 0 0 CB_HEADER("list");
64 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
66 0 0 mXPUSHi(flags);
68 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
75 0 0 if (!rcb) { return; }
77 0 0 CB_HEADER("listitem");
79 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
81 0 0 mXPUSHi(flags);
83 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
90 3 0 if (!rcb) { return; }
92 0 3 CB_HEADER("paragraph");
94 3 0 PUSHBUF(content);
0 3 PUSHBUF(content);
0 0 PUSHBUF(content);
96 3 0 CB_FOOTER;
3 0 CB_FOOTER;
3 0 CB_FOOTER;
3 0 CB_FOOTER;
103 0 0 if (!rcb) { return; }
105 0 0 CB_HEADER("table");
107 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
109 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
116 0 0 if (!rcb) { return; }
118 0 0 CB_HEADER("table_header");
120 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
122 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
129 0 0 if (!rcb) { return; }
131 0 0 CB_HEADER("table_body");
133 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
135 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
142 0 0 if (!rcb) { return; }
144 0 0 CB_HEADER("table_row");
146 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
148 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
155 0 0 if (!rcb) { return; }
157 0 0 CB_HEADER("table_cell");
159 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
161 0 0 mXPUSHi(flags);
163 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
170 0 0 if (!rcb) { return; }
172 0 0 CB_HEADER("footnotes");
174 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
176 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
183 0 0 if (!rcb) { return; }
185 0 0 CB_HEADER("footnote_def");
187 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
189 0 0 mXPUSHu(num);
191 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
198 0 0 if (!rcb) { return; }
200 0 0 CB_HEADER("blockhtml");
202 0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
204 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
211 1 0 if (!rcb) { return 0; }
213 0 1 CB_HEADER("autolink");
215 1 0 PUSHBUF(link);
0 1 PUSHBUF(link);
0 0 PUSHBUF(link);
217 0 1 mXPUSHi(type);
219 1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
221 1 0 return is_null ? 0 : 1;
228 1 0 if (!rcb) { return 0; }
230 0 1 CB_HEADER("codespan");
232 1 0 PUSHBUF(text);
0 1 PUSHBUF(text);
0 0 PUSHBUF(text);
234 1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
236 1 0 return is_null ? 0 : 1;
243 0 0 if (!rcb) { return 0; }
245 0 0 CB_HEADER("double_emphasis");
247 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
249 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
251 0 0 return is_null ? 0 : 1;
258 0 0 if (!rcb) { return 0; }
260 0 0 CB_HEADER("emphasis");
262 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
264 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
266 0 0 return is_null ? 0 : 1;
273 1 0 if (!rcb) { return 0; }
275 0 1 CB_HEADER("underline");
277 1 0 PUSHBUF(content);
0 1 PUSHBUF(content);
0 0 PUSHBUF(content);
279 1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
281 1 0 return is_null ? 0 : 1;
288 0 0 if (!rcb) { return 0; }
290 0 0 CB_HEADER("highlight");
292 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
294 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
296 0 0 return is_null ? 0 : 1;
303 0 0 if (!rcb) { return 0; }
305 0 0 CB_HEADER("quote");
307 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
309 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
311 0 0 return is_null ? 0 : 1;
318 2 0 if (!rcb) { return 0; }
320 0 2 CB_HEADER("image");
322 2 0 PUSHBUF(link);
0 2 PUSHBUF(link);
0 0 PUSHBUF(link);
324 1 1 PUSHBUF(title);
0 1 PUSHBUF(title);
0 1 PUSHBUF(title);
326 2 0 PUSHBUF(alt);
0 2 PUSHBUF(alt);
0 0 PUSHBUF(alt);
328 2 0 CB_FOOTER;
2 0 CB_FOOTER;
2 0 CB_FOOTER;
2 0 CB_FOOTER;
330 2 0 return is_null ? 0 : 1;
337 0 0 if (!rcb) { return 0; }
339 0 0 CB_HEADER("linebreak");
341 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
343 0 0 return is_null ? 0 : 1;
350 4 0 if (!rcb) { return 0; }
352 0 4 CB_HEADER("link");
354 4 0 PUSHBUF(content);
0 4 PUSHBUF(content);
0 0 PUSHBUF(content);
356 4 0 PUSHBUF(link);
0 4 PUSHBUF(link);
0 0 PUSHBUF(link);
358 4 0 PUSHBUF(title);
0 4 PUSHBUF(title);
0 0 PUSHBUF(title);
360 4 0 CB_FOOTER;
4 0 CB_FOOTER;
4 0 CB_FOOTER;
4 0 CB_FOOTER;
362 4 0 return is_null ? 0 : 1;
369 0 0 if (!rcb) { return 0; }
371 0 0 CB_HEADER("triple_emphasis");
373 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
375 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
377 0 0 return is_null ? 0 : 1;
384 0 0 if (!rcb) { return 0; }
386 0 0 CB_HEADER("strikethrough");
388 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
390 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
392 0 0 return is_null ? 0 : 1;
399 0 0 if (!rcb) { return 0; }
401 0 0 CB_HEADER("superscript");
403 0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
0 0 PUSHBUF(content);
405 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
407 0 0 return is_null ? 0 : 1;
414 0 0 if (!rcb) { return 0; }
416 0 0 CB_HEADER("footnote_ref");
418 0 0 mXPUSHu(num);
420 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
422 0 0 return is_null ? 0 : 1;
429 0 0 if (!rcb) { return 0; }
431 0 0 CB_HEADER("math");
433 0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
435 0 0 mXPUSHi(displaymode);
437 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
439 0 0 return is_null ? 0 : 1;
446 2 0 if (!rcb) { return 0; }
448 0 2 CB_HEADER("raw_html");
450 2 0 PUSHBUF(text);
0 2 PUSHBUF(text);
0 0 PUSHBUF(text);
452 2 0 CB_FOOTER;
2 0 CB_FOOTER;
2 0 CB_FOOTER;
2 0 CB_FOOTER;
454 2 0 return is_null ? 0 : 1;
461 0 0 if (!rcb) { return; }
463 0 0 CB_HEADER("entity");
465 0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
0 0 PUSHBUF(text);
467 0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
0 0 CB_FOOTER;
474 27 0 if (!rcb) { return; }
476 0 27 CB_HEADER("normal_text");
478 27 0 PUSHBUF(text);
0 27 PUSHBUF(text);
0 0 PUSHBUF(text);
480 27 0 CB_FOOTER;
27 0 CB_FOOTER;
27 0 CB_FOOTER;
27 0 CB_FOOTER;
487 1 0 if (!rcb) { return; }
489 0 1 CB_HEADER("doc_header");
491 0 1 mXPUSHi(inline_render);
493 1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
500 1 0 if (!rcb) { return; }
502 0 1 CB_HEADER("doc_footer");
504 0 1 mXPUSHi(inline_render);
506 1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;
1 0 CB_FOOTER;