pull the htmlify paragraph loop out of htmlify() and it_htmlify() so that it won't want to drift out of sync

This commit is contained in:
david parsons
2018-04-19 03:32:47 -07:00
parent 2578c37ff3
commit e5f58dcebc
+14 -11
View File
@@ -1718,6 +1718,18 @@ printhtml(Line *t, MMIOT *f)
}
static void
htmlify_paragraphs(Paragraph *p, MMIOT *f)
{
___mkd_emblock(f);
while (( p = display(p, f) )) {
___mkd_emblock(f);
Qstring("\n\n", f);
}
}
#ifdef GITHUB_CHECKBOX
static void
li_htmlify(Paragraph *p, char *arguments, int flags, MMIOT *f)
@@ -1737,12 +1749,7 @@ li_htmlify(Paragraph *p, char *arguments, int flags, MMIOT *f)
Qprintf(f, "/>");
}
___mkd_emblock(f);
while (( p = display(p, f) )) {
___mkd_emblock(f);
Qstring("\n", f);
}
htmlify_paragraphs(p, f);
Qprintf(f, "</li>");
___mkd_emblock(f);
@@ -1756,12 +1763,8 @@ htmlify(Paragraph *p, char *block, char *arguments, MMIOT *f)
___mkd_emblock(f);
if ( block )
Qprintf(f, arguments ? "<%s %s>" : "<%s>", block, arguments);
___mkd_emblock(f);
while (( p = display(p, f) )) {
___mkd_emblock(f);
Qstring("\n\n", f);
}
htmlify_paragraphs(p, f);
if ( block )
Qprintf(f, "</%s>", block);