htmlblock_find_end • try to find HTML block ending tag */ returns the length on match, 0 otherwise */
| 2060 | /* htmlblock_find_end • try to find HTML block ending tag */ |
| 2061 | /* returns the length on match, 0 otherwise */ |
| 2062 | static size_t |
| 2063 | htmlblock_find_end( |
| 2064 | const char *tag, |
| 2065 | size_t tag_len, |
| 2066 | hoedown_document *doc, |
| 2067 | uint8_t *data, |
| 2068 | size_t size) |
| 2069 | { |
| 2070 | size_t i = 0, w; |
| 2071 | |
| 2072 | while (1) { |
| 2073 | while (i < size && data[i] != '<') i++; |
| 2074 | if (i >= size) return 0; |
| 2075 | |
| 2076 | w = htmlblock_is_end(tag, tag_len, doc, data + i, size - i); |
| 2077 | if (w) return i + w; |
| 2078 | i++; |
| 2079 | } |
| 2080 | } |
| 2081 | |
| 2082 | /* htmlblock_find_end_strict • try to find end of HTML block in strict mode */ |
| 2083 | /* (it must be an unindented line, and have a blank line afterwads) */ |
no test coverage detected