aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--html.c18
-rw-r--r--html.h4
-rw-r--r--man_html.c13
-rw-r--r--mdoc_html.c12
4 files changed, 30 insertions, 17 deletions
diff --git a/html.c b/html.c
index d3fbf852..5a29eb0e 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.170 2014/09/27 09:26:01 kristaps Exp $ */
+/* $Id: html.c,v 1.171 2014/09/27 10:56:18 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -68,7 +68,6 @@ static const struct htmldata htmltags[TAG_MAX] = {
{"dt", HTML_CLRLINE}, /* TAG_DT */
{"dd", HTML_CLRLINE}, /* TAG_DD */
{"blockquote", HTML_CLRLINE}, /* TAG_BLOCKQUOTE */
- {"p", HTML_CLRLINE | HTML_NOSTACK | HTML_AUTOCLOSE}, /* TAG_P */
{"pre", HTML_CLRLINE }, /* TAG_PRE */
{"b", 0 }, /* TAG_B */
{"i", 0 }, /* TAG_I */
@@ -203,7 +202,8 @@ print_gen_head(struct html *h)
"td.head-rtitle, td.foot-os { text-align: right; }\n"
"td.head-vol { text-align: center; }\n"
"table.foot td { width: 50%; }\n"
- "table.head td { width: 33%; }\n");
+ "table.head td { width: 33%; }\n"
+ "div.spacer { margin: 1em 0; }\n");
print_tagq(h, t);
if (h->style) {
@@ -623,6 +623,18 @@ print_stagq(struct html *h, const struct tag *suntil)
}
void
+print_paragraph(struct html *h)
+{
+ struct tag *t;
+ struct htmlpair tag;
+
+ PAIR_CLASS_INIT(&tag, "spacer");
+ t = print_otag(h, TAG_DIV, 1, &tag);
+ print_tagq(h, t);
+}
+
+
+void
bufinit(struct html *h)
{
diff --git a/html.h b/html.h
index a9a58430..5b67eca7 100644
--- a/html.h
+++ b/html.h
@@ -1,4 +1,4 @@
-/* $Id: html.h,v 1.60 2014/09/27 09:26:01 kristaps Exp $ */
+/* $Id: html.h,v 1.61 2014/09/27 10:56:18 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -44,7 +44,6 @@ enum htmltag {
TAG_DT,
TAG_DD,
TAG_BLOCKQUOTE,
- TAG_P,
TAG_PRE,
TAG_B,
TAG_I,
@@ -144,6 +143,7 @@ void print_text(struct html *, const char *);
void print_tblclose(struct html *);
void print_tbl(struct html *, const struct tbl_span *);
void print_eqn(struct html *, const struct eqn *);
+void print_paragraph(struct html *);
#if __GNUC__ - 0 >= 4
__attribute__((__format__ (__printf__, 2, 3)))
diff --git a/man_html.c b/man_html.c
index b19ede0b..69daf4d7 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.102 2014/09/27 09:26:01 kristaps Exp $ */
+/* $Id: man_html.c,v 1.103 2014/09/27 10:56:18 kristaps Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -142,7 +142,7 @@ print_bvspace(struct html *h, const struct man_node *n)
if (NULL == n->prev)
return;
- print_otag(h, TAG_P, 0, NULL);
+ print_paragraph(h);
}
void
@@ -219,7 +219,7 @@ print_man_node(MAN_ARGS)
* before printing the line's data.
*/
if ('\0' == *n->string) {
- print_otag(h, TAG_P, 0, NULL);
+ print_paragraph(h);
return;
}
@@ -538,7 +538,7 @@ man_IP_pre(MAN_ARGS)
static int
man_HP_pre(MAN_ARGS)
{
- struct htmlpair tag;
+ struct htmlpair tag[2];
struct roffsu su;
const struct man_node *np;
@@ -558,8 +558,9 @@ man_HP_pre(MAN_ARGS)
bufcat_su(h, "margin-left", &su);
su.scale = -su.scale;
bufcat_su(h, "text-indent", &su);
- PAIR_STYLE_INIT(&tag, h);
- print_otag(h, TAG_P, 1, &tag);
+ PAIR_STYLE_INIT(&tag[0], h);
+ PAIR_CLASS_INIT(&tag[1], "spacer");
+ print_otag(h, TAG_DIV, 2, tag);
return(1);
}
diff --git a/mdoc_html.c b/mdoc_html.c
index 9de0c1c8..e9f66206 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.205 2014/09/27 09:26:01 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.206 2014/09/27 10:56:18 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -314,11 +314,11 @@ synopsis_pre(struct html *h, const struct mdoc_node *n)
case MDOC_In:
/* FALLTHROUGH */
case MDOC_Vt:
- print_otag(h, TAG_P, 0, NULL);
+ print_paragraph(h);
break;
case MDOC_Ft:
if (MDOC_Fn != n->tok && MDOC_Fo != n->tok) {
- print_otag(h, TAG_P, 0, NULL);
+ print_paragraph(h);
break;
}
/* FALLTHROUGH */
@@ -1156,7 +1156,7 @@ mdoc_bd_pre(MDOC_ARGS)
break;
}
if ( ! comp)
- print_otag(h, TAG_P, 0, NULL);
+ print_paragraph(h);
return(1);
}
@@ -1562,7 +1562,7 @@ static int
mdoc_pp_pre(MDOC_ARGS)
{
- print_otag(h, TAG_P, 0, NULL);
+ print_paragraph(h);
return(0);
}
@@ -1890,7 +1890,7 @@ mdoc_rs_pre(MDOC_ARGS)
return(1);
if (n->prev && SEC_SEE_ALSO == n->sec)
- print_otag(h, TAG_P, 0, NULL);
+ print_paragraph(h);
PAIR_CLASS_INIT(&tag, "ref");
print_otag(h, TAG_SPAN, 1, &tag);