From 857e034db681b3005c938654ecbd7e973cc29908 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 14 Nov 2009 12:04:59 +0000 Subject: Removed superfluous HTML_NEWLINE. --- html.c | 13 ++----------- html.h | 3 +-- mdoc_html.c | 13 ++++++------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/html.c b/html.c index ff71f253..887c7de4 100644 --- a/html.c +++ b/html.c @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.86 2009/11/14 12:00:24 kristaps Exp $ */ +/* $Id: html.c,v 1.87 2009/11/14 12:04:59 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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("", 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; diff --git a/html.h b/html.h index c4fc793d..87451ea8 100644 --- a/html.h +++ b/html.h @@ -1,4 +1,4 @@ -/* $Id: html.h,v 1.19 2009/11/14 11:58:36 kristaps Exp $ */ +/* $Id: html.h,v 1.20 2009/11/14 12:04:59 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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 15986cc7..df14ea61 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.46 2009/10/31 08:34:12 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.47 2009/11/14 12:04:59 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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); -- cgit v1.2.3-56-ge451