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

Function parse_list

libraries/hoedown/src/document.c:1936–1956  ·  view source on GitHub ↗

parse_list • parsing ordered or unordered list block */

Source from the content-addressed store, hash-verified

1934
1935/* parse_list • parsing ordered or unordered list block */
1936static size_t
1937parse_list(hoedown_buffer *ob, hoedown_document *doc, uint8_t *data, size_t size, hoedown_list_flags flags)
1938{
1939 hoedown_buffer *work = 0;
1940 size_t i = 0, j;
1941
1942 work = newbuf(doc, BUFFER_BLOCK);
1943
1944 while (i < size) {
1945 j = parse_listitem(work, doc, data + i, size - i, &flags);
1946 i += j;
1947
1948 if (!j || (flags & HOEDOWN_LI_END))
1949 break;
1950 }
1951
1952 if (doc->md.list)
1953 doc->md.list(ob, work, flags, &doc->data);
1954 popbuf(doc, BUFFER_BLOCK);
1955 return i;
1956}
1957
1958/* parse_atxheader • parsing of atx-style headers */
1959static size_t

Callers 1

parse_blockFunction · 0.85

Calls 3

newbufFunction · 0.85
parse_listitemFunction · 0.85
popbufFunction · 0.85

Tested by

no test coverage detected