summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-11-14 12:04:59 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-11-14 12:04:59 +0000
commit857e034db681b3005c938654ecbd7e973cc29908 (patch)
treecc454f010cfed332244610031f67ed13db0447d7
parentd502d4a4bb59a31df7fdbcf4a9b59c21fc1aef1c (diff)
downloadmandoc-857e034db681b3005c938654ecbd7e973cc29908.tar.gz
mandoc-857e034db681b3005c938654ecbd7e973cc29908.tar.zst
mandoc-857e034db681b3005c938654ecbd7e973cc29908.zip
Removed superfluous HTML_NEWLINE.
-rw-r--r--html.c13
-rw-r--r--html.h3
-rw-r--r--mdoc_html.c13
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 <kristaps@kth.se>
*
@@ -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 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 <kristaps@kth.se>
*
@@ -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 <kristaps@kth.se>
*
@@ -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);