summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--html.c11
-rw-r--r--html.h1
-rw-r--r--mdoc_html.c11
3 files changed, 6 insertions, 17 deletions
diff --git a/html.c b/html.c
index 3d2e014e..7833b9e5 100644
--- a/html.c
+++ b/html.c
@@ -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;
diff --git a/html.h b/html.h
index add7c12b..31ce8130 100644
--- a/html.h
+++ b/html.h
@@ -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);