MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / htmlblock_find_end

Function htmlblock_find_end

libraries/hoedown/src/document.c:2062–2080  ·  view source on GitHub ↗

htmlblock_find_end • try to find HTML block ending tag */ returns the length on match, 0 otherwise */

Source from the content-addressed store, hash-verified

2060/* htmlblock_find_end • try to find HTML block ending tag */
2061/* returns the length on match, 0 otherwise */
2062static size_t
2063htmlblock_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) */

Callers 2

parse_htmlblockFunction · 0.85

Calls 1

htmlblock_is_endFunction · 0.85

Tested by

no test coverage detected