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

Function parse_footnote_list

libraries/hoedown/src/document.c:2008–2030  ·  view source on GitHub ↗

parse_footnote_list • render the contents of the footnotes */

Source from the content-addressed store, hash-verified

2006
2007/* parse_footnote_list • render the contents of the footnotes */
2008static void
2009parse_footnote_list(hoedown_buffer *ob, hoedown_document *doc, struct footnote_list *footnotes)
2010{
2011 hoedown_buffer *work = 0;
2012 struct footnote_item *item;
2013 struct footnote_ref *ref;
2014
2015 if (footnotes->count == 0)
2016 return;
2017
2018 work = newbuf(doc, BUFFER_BLOCK);
2019
2020 item = footnotes->head;
2021 while (item) {
2022 ref = item->ref;
2023 parse_footnote_def(work, doc, ref->num, ref->contents->data, ref->contents->size);
2024 item = item->next;
2025 }
2026
2027 if (doc->md.footnotes)
2028 doc->md.footnotes(ob, work, &doc->data);
2029 popbuf(doc, BUFFER_BLOCK);
2030}
2031
2032/* htmlblock_is_end • check for end of HTML block : </tag>( *)\n */
2033/* returns tag length on match, 0 otherwise */

Callers 1

hoedown_document_renderFunction · 0.85

Calls 3

newbufFunction · 0.85
parse_footnote_defFunction · 0.85
popbufFunction · 0.85

Tested by

no test coverage detected