aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/html.c b/html.c
index 7f8ca02d..b7db8fdd 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.258 2019/09/01 15:12:19 schwarze Exp $ */
+/* $Id: html.c,v 1.259 2019/09/03 12:31:05 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -271,21 +271,18 @@ print_metaf(struct html *h)
void
html_close_paragraph(struct html *h)
{
- struct tag *t;
+ struct tag *this, *next;
+ int flags;
- for (t = h->tag; t != NULL && t->closed == 0; t = t->next) {
- switch(t->tag) {
- case TAG_P:
- case TAG_PRE:
- print_tagq(h, t);
+ this = h->tag;
+ for (;;) {
+ next = this->next;
+ flags = htmltags[this->tag].flags;
+ if (flags & (HTML_INPHRASE | HTML_TOPHRASE))
+ print_ctag(h, this);
+ if ((flags & HTML_INPHRASE) == 0)
break;
- case TAG_A:
- print_tagq(h, t);
- continue;
- default:
- continue;
- }
- break;
+ this = next;
}
}