parse_footnote_list • render the contents of the footnotes */
| 2006 | |
| 2007 | /* parse_footnote_list • render the contents of the footnotes */ |
| 2008 | static void |
| 2009 | parse_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 */ |
no test coverage detected