htmlblock_find_end_strict • try to find end of HTML block in strict mode */ (it must be an unindented line, and have a blank line afterwads) */ returns the length on match, 0 otherwise */
| 2083 | /* (it must be an unindented line, and have a blank line afterwads) */ |
| 2084 | /* returns the length on match, 0 otherwise */ |
| 2085 | static size_t |
| 2086 | htmlblock_find_end_strict( |
| 2087 | const char *tag, |
| 2088 | size_t tag_len, |
| 2089 | hoedown_document *doc, |
| 2090 | uint8_t *data, |
| 2091 | size_t size) |
| 2092 | { |
| 2093 | size_t i = 0, mark; |
| 2094 | |
| 2095 | while (1) { |
| 2096 | mark = i; |
| 2097 | while (i < size && data[i] != '\n') i++; |
| 2098 | if (i < size) i++; |
| 2099 | if (i == mark) return 0; |
| 2100 | |
| 2101 | if (data[mark] == ' ' && mark > 0) continue; |
| 2102 | mark += htmlblock_find_end(tag, tag_len, doc, data + mark, i - mark); |
| 2103 | if (mark == i && (is_empty(data + i, size - i) || i >= size)) break; |
| 2104 | } |
| 2105 | |
| 2106 | return i; |
| 2107 | } |
| 2108 | |
| 2109 | /* parse_htmlblock • parsing of inline HTML block */ |
| 2110 | static size_t |
no test coverage detected