| line |
true |
false |
branch |
|
42
|
273 |
8 |
for (i = 0; i < plen; i++) { |
|
43
|
0 |
273 |
if (!str[i]) return 0; |
|
44
|
106 |
167 |
if (tolower((unsigned char)str[i]) != tolower((unsigned char)prefix[i])) |
|
58
|
0 |
192 |
if (!isalpha((unsigned char)*p)) return 0; |
|
59
|
689 |
192 |
while (isalnum((unsigned char)p[n]) || p[n] == ':' || p[n] == '_' || p[n] == '-') |
|
|
0 |
192 |
while (isalnum((unsigned char)p[n]) || p[n] == ':' || p[n] == '_' || p[n] == '-') |
|
|
0 |
192 |
while (isalnum((unsigned char)p[n]) || p[n] == ':' || p[n] == '_' || p[n] == '-') |
|
|
0 |
192 |
while (isalnum((unsigned char)p[n]) || p[n] == ':' || p[n] == '_' || p[n] == '-') |
|
75
|
444 |
27 |
for (i = 0; eshu_html_void_elements[i]; i++) { |
|
78
|
101 |
343 |
if (ve_len == name_len) { |
|
80
|
133 |
10 |
for (j = 0; j < name_len; j++) { |
|
81
|
91 |
42 |
if (tolower((unsigned char)name[j]) != ve[j]) { |
|
86
|
10 |
91 |
if (match) return 1; |
|
102
|
108 |
34 |
for (i = 0; eshu_html_verbatim_elements[i]; i++) { |
|
105
|
11 |
97 |
if (ve_len == name_len) { |
|
107
|
23 |
3 |
for (j = 0; j < name_len; j++) { |
|
108
|
8 |
15 |
if (tolower((unsigned char)name[j]) != ve[j]) { |
|
113
|
3 |
8 |
if (match) return 1; |
|
126
|
85 |
9 |
while (p < eol) { |
|
127
|
3 |
82 |
if (p[0] == '<' && p[1] == '/') { |
|
|
3 |
0 |
if (p[0] == '<' && p[1] == '/') { |
|
129
|
3 |
0 |
if (eshu_xml_ci_prefix(p, eshu_xml_verbatim_tag, |
|
132
|
3 |
0 |
while (after < eol && (*after == ' ' || *after == '\t')) |
|
|
0 |
3 |
while (after < eol && (*after == ' ' || *after == '\t')) |
|
|
0 |
3 |
while (after < eol && (*after == ' ' || *after == '\t')) |
|
134
|
3 |
0 |
if (after < eol && *after == '>') |
|
|
3 |
0 |
if (after < eol && *after == '>') |
|
163
|
6 |
172 |
if (ctx->in_tag) { |
|
164
|
79 |
3 |
while (p < eol) { |
|
165
|
36 |
43 |
if (ctx->state == ESHU_XML_ATTR_DQ) { |
|
166
|
6 |
30 |
if (*p == '"') ctx->state = ESHU_XML_TAG; |
|
170
|
0 |
43 |
if (ctx->state == ESHU_XML_ATTR_SQ) { |
|
171
|
0 |
0 |
if (*p == '\'') ctx->state = ESHU_XML_TAG; |
|
175
|
6 |
37 |
if (*p == '"') { |
|
180
|
0 |
37 |
if (*p == '\'') { |
|
185
|
35 |
2 |
if (p + 1 < eol && p[0] == '/' && p[1] == '>') { |
|
|
1 |
34 |
if (p + 1 < eol && p[0] == '/' && p[1] == '>') { |
|
|
1 |
0 |
if (p + 1 < eol && p[0] == '/' && p[1] == '>') { |
|
192
|
2 |
34 |
if (*p == '>') { |
|
195
|
2 |
0 |
if (!ctx->tag_is_close) { |
|
204
|
3 |
3 |
if (ctx->in_tag) return; /* still inside tag */ |
|
207
|
539 |
169 |
while (p < eol) { |
|
209
|
67 |
472 |
if (ctx->state == ESHU_XML_COMMENT) { |
|
210
|
63 |
4 |
if (p + 2 < eol && p[0] == '-' && p[1] == '-' && p[2] == '>') { |
|
|
4 |
59 |
if (p + 2 < eol && p[0] == '-' && p[1] == '-' && p[2] == '>') { |
|
|
4 |
0 |
if (p + 2 < eol && p[0] == '-' && p[1] == '-' && p[2] == '>') { |
|
|
4 |
0 |
if (p + 2 < eol && p[0] == '-' && p[1] == '-' && p[2] == '>') { |
|
220
|
47 |
425 |
if (ctx->state == ESHU_XML_CDATA) { |
|
221
|
43 |
4 |
if (p + 2 < eol && p[0] == ']' && p[1] == ']' && p[2] == '>') { |
|
|
3 |
40 |
if (p + 2 < eol && p[0] == ']' && p[1] == ']' && p[2] == '>') { |
|
|
3 |
0 |
if (p + 2 < eol && p[0] == ']' && p[1] == ']' && p[2] == '>') { |
|
|
3 |
0 |
if (p + 2 < eol && p[0] == ']' && p[1] == ']' && p[2] == '>') { |
|
231
|
53 |
372 |
if (ctx->state == ESHU_XML_PI) { |
|
232
|
53 |
0 |
if (p + 1 < eol && p[0] == '?' && p[1] == '>') { |
|
|
2 |
51 |
if (p + 1 < eol && p[0] == '?' && p[1] == '>') { |
|
|
2 |
0 |
if (p + 1 < eol && p[0] == '?' && p[1] == '>') { |
|
242
|
12 |
360 |
if (ctx->state == ESHU_XML_DOCTYPE) { |
|
243
|
2 |
10 |
if (*p == '>') { |
|
253
|
157 |
203 |
if (*p != '<') { |
|
260
|
199 |
4 |
if (p + 3 < eol && p[1] == '!' && p[2] == '-' && p[3] == '-') { |
|
|
9 |
190 |
if (p + 3 < eol && p[1] == '!' && p[2] == '-' && p[3] == '-') { |
|
|
4 |
5 |
if (p + 3 < eol && p[1] == '!' && p[2] == '-' && p[3] == '-') { |
|
|
4 |
0 |
if (p + 3 < eol && p[1] == '!' && p[2] == '-' && p[3] == '-') { |
|
267
|
58 |
141 |
if (p + 8 < eol && eshu_xml_ci_prefix(p, "
|
|
|
3 |
55 |
if (p + 8 < eol && eshu_xml_ci_prefix(p, "
|
|
274
|
53 |
143 |
if (p + 9 < eol && eshu_xml_ci_prefix(p, "
|
|
|
2 |
51 |
if (p + 9 < eol && eshu_xml_ci_prefix(p, "
|
|
281
|
194 |
0 |
if (p + 1 < eol && p[1] == '?') { |
|
|
2 |
192 |
if (p + 1 < eol && p[1] == '?') { |
|
288
|
192 |
0 |
if (p + 1 < eol && p[1] == '/') { |
|
|
85 |
107 |
if (p + 1 < eol && p[1] == '/') { |
|
291
|
85 |
0 |
if (nlen > 0) { |
|
294
|
85 |
0 |
while (p < eol && *p != '>') p++; |
|
|
0 |
85 |
while (p < eol && *p != '>') p++; |
|
295
|
85 |
0 |
if (p < eol) p++; /* skip > */ |
|
307
|
107 |
0 |
if (nlen > 0) { |
|
309
|
37 |
70 |
int is_void_el = is_html && eshu_xml_is_void(tag_start, nlen); |
|
|
10 |
27 |
int is_void_el = is_html && eshu_xml_is_void(tag_start, nlen); |
|
310
|
37 |
70 |
int is_verbatim_el = is_html && eshu_xml_is_verbatim(tag_start, nlen); |
|
|
3 |
34 |
int is_verbatim_el = is_html && eshu_xml_is_verbatim(tag_start, nlen); |
|
317
|
193 |
3 |
while (p < eol) { |
|
318
|
12 |
181 |
if (*p == '"') { |
|
320
|
63 |
0 |
while (p < eol && *p != '"') p++; |
|
|
51 |
12 |
while (p < eol && *p != '"') p++; |
|
321
|
12 |
0 |
if (p < eol) p++; |
|
324
|
0 |
181 |
if (*p == '\'') { |
|
326
|
0 |
0 |
while (p < eol && *p != '\'') p++; |
|
|
0 |
0 |
while (p < eol && *p != '\'') p++; |
|
327
|
0 |
0 |
if (p < eol) p++; |
|
330
|
117 |
64 |
if (p + 1 < eol && p[0] == '/' && p[1] == '>') { |
|
|
7 |
110 |
if (p + 1 < eol && p[0] == '/' && p[1] == '>') { |
|
|
7 |
0 |
if (p + 1 < eol && p[0] == '/' && p[1] == '>') { |
|
336
|
97 |
77 |
if (*p == '>') { |
|
344
|
3 |
104 |
if (!tag_complete) { |
|
353
|
97 |
7 |
if (!self_closing && !is_void_el) { |
|
|
87 |
10 |
if (!self_closing && !is_void_el) { |
|
354
|
3 |
84 |
if (is_verbatim_el) { |
|
380
|
166 |
0 |
if (content < eol && content[0] == '<' && content + 1 < eol && content[1] == '/') { |
|
|
165 |
1 |
if (content < eol && content[0] == '<' && content + 1 < eol && content[1] == '/') { |
|
|
165 |
0 |
if (content < eol && content[0] == '<' && content + 1 < eol && content[1] == '/') { |
|
|
52 |
113 |
if (content < eol && content[0] == '<' && content + 1 < eol && content[1] == '/') { |
|
391
|
0 |
0 |
if (ctx->in_tag) { |
|
408
|
190 |
2 |
int is_blank = (content == eol || *content == '\n'); |
|
|
0 |
190 |
int is_blank = (content == eol || *content == '\n'); |
|
411
|
12 |
180 |
if (ctx->state == ESHU_XML_VERBATIM) { |
|
412
|
3 |
9 |
if (eshu_xml_verbatim_end(content, eol)) { |
|
415
|
0 |
3 |
if (ctx->depth < 0) ctx->depth = 0; |
|
419
|
3 |
0 |
if (*eol == '\n') eshu_buf_putc(out, '\n'); |
|
423
|
9 |
0 |
if (*eol == '\n') eshu_buf_putc(out, '\n'); |
|
429
|
2 |
178 |
if (is_blank) { |
|
430
|
2 |
0 |
if (*eol == '\n') eshu_buf_putc(out, '\n'); |
|
435
|
175 |
3 |
if (ctx->state == ESHU_XML_COMMENT || ctx->state == ESHU_XML_CDATA || |
|
|
172 |
3 |
if (ctx->state == ESHU_XML_COMMENT || ctx->state == ESHU_XML_CDATA || |
|
436
|
172 |
0 |
ctx->state == ESHU_XML_PI || ctx->state == ESHU_XML_DOCTYPE) { |
|
|
0 |
172 |
ctx->state == ESHU_XML_PI || ctx->state == ESHU_XML_DOCTYPE) { |
|
440
|
6 |
0 |
if (*eol == '\n') eshu_buf_putc(out, '\n'); |
|
443
|
0 |
6 |
if (ctx->depth < 0) ctx->depth = 0; |
|
448
|
6 |
166 |
if (ctx->in_tag) { |
|
452
|
6 |
0 |
if (*eol == '\n') eshu_buf_putc(out, '\n'); |
|
455
|
0 |
6 |
if (ctx->depth < 0) ctx->depth = 0; |
|
469
|
166 |
0 |
if (*eol == '\n') eshu_buf_putc(out, '\n'); |
|
477
|
52 |
114 |
if (line_pre == -1) { |
|
482
|
0 |
166 |
if (ctx->depth < 0) ctx->depth = 0; |
|
501
|
192 |
35 |
while (p < end) { |
|
504
|
192 |
0 |
p = (*eol == '\n') ? eol + 1 : eol; |
|
505
|
0 |
192 |
if (p > end) p = end; |