diff options
-rw-r--r-- | html.c | 11 | ||||
-rw-r--r-- | html.h | 1 | ||||
-rw-r--r-- | mdoc_html.c | 11 |
3 files changed, 6 insertions, 17 deletions
@@ -306,11 +306,6 @@ print_otag(struct html *h, enum htmltag tag, putchar('>'); h->flags |= HTML_NOSPACE; - if (HTML_CLRLINE & htmltags[tag].flags) - h->flags |= HTML_NEWLINE; - else - h->flags &= ~HTML_NEWLINE; - return(t); } @@ -323,10 +318,8 @@ print_ctag(struct html *h, enum htmltag tag) printf("</%s>", htmltags[tag].name); if (HTML_CLRLINE & htmltags[tag].flags) { h->flags |= HTML_NOSPACE; - h->flags |= HTML_NEWLINE; putchar('\n'); - } else - h->flags &= ~HTML_NEWLINE; + } } @@ -372,8 +365,6 @@ print_text(struct html *h, const char *p) if ( ! (h->flags & HTML_NOSPACE)) putchar(' '); - h->flags &= ~HTML_NEWLINE; - assert(p); if ( ! print_encode(h, p)) h->flags &= ~HTML_NOSPACE; @@ -101,7 +101,6 @@ struct htmlpair { struct html { int flags; #define HTML_NOSPACE (1 << 0) -#define HTML_NEWLINE (1 << 1) #define HTML_IGNDELIM (1 << 2) struct tagq tags; struct ordq ords; diff --git a/mdoc_html.c b/mdoc_html.c index 9e591d5c..dc8d468c 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -725,12 +725,11 @@ mdoc_nm_pre(MDOC_ARGS) { struct htmlpair tag; - if ( ! (HTML_NEWLINE & h->flags)) - if (SEC_SYNOPSIS == n->sec) { - bufcat_style(h, "clear", "both"); - PAIR_STYLE_INIT(&tag, h); - print_otag(h, TAG_BR, 1, &tag); - } + if (SEC_SYNOPSIS == n->sec && n->prev) { + bufcat_style(h, "clear", "both"); + PAIR_STYLE_INIT(&tag, h); + print_otag(h, TAG_BR, 1, &tag); + } PAIR_CLASS_INIT(&tag, "name"); print_otag(h, TAG_SPAN, 1, &tag); |