aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-13 06:22:11 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-13 06:22:11 +0000
commitbbca9de4c44fc5e7d5aa68015495daccc2f69081 (patch)
treea958d78176c6f69c955bca59a0eed757293c2ef1 /mdoc_html.c
parentfa29183f6542c3a65f105c7296ce435beb629a12 (diff)
downloadmandoc-bbca9de4c44fc5e7d5aa68015495daccc2f69081.tar.gz
mandoc-bbca9de4c44fc5e7d5aa68015495daccc2f69081.tar.zst
mandoc-bbca9de4c44fc5e7d5aa68015495daccc2f69081.zip
Fixed bug in -Thtml -mdoc where `Lb' would line-break in LIBRARY section.
Fixed assumption that parse-point == 1 equates to beginning of line (false if whitespace separates macro and control character). Fixed line-break for non-first-macro in several SYNOPSIS macros.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 0ba4bea3..3f5d4ab6 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.61 2010/04/08 08:17:55 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.62 2010/05/13 06:22:11 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -729,7 +729,8 @@ mdoc_nm_pre(MDOC_ARGS)
{
struct htmlpair tag;
- if (SEC_SYNOPSIS == n->sec && n->prev) {
+ if (SEC_SYNOPSIS == n->sec &&
+ n->prev && MDOC_LINE & n->flags) {
bufcat_style(h, "clear", "both");
PAIR_STYLE_INIT(&tag, h);
print_otag(h, TAG_BR, 1, &tag);
@@ -1557,7 +1558,7 @@ mdoc_fd_pre(MDOC_ARGS)
struct htmlpair tag;
struct roffsu su;
- if (SEC_SYNOPSIS == n->sec) {
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) {
if (n->next && MDOC_Fd != n->next->tok) {
SCALE_VS_INIT(&su, 1);
bufcat_su(h, "margin-bottom", &su);
@@ -1605,7 +1606,7 @@ mdoc_ft_pre(MDOC_ARGS)
{
struct htmlpair tag;
- if (SEC_SYNOPSIS == n->sec)
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)
print_otag(h, TAG_DIV, 0, NULL);
PAIR_CLASS_INIT(&tag, "ftype");
@@ -1626,7 +1627,7 @@ mdoc_fn_pre(MDOC_ARGS)
int sz, i;
struct roffsu su;
- if (SEC_SYNOPSIS == n->sec) {
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) {
SCALE_HS_INIT(&su, INDENT);
bufcat_su(h, "margin-left", &su);
su.scale = -su.scale;
@@ -1867,7 +1868,7 @@ mdoc_in_pre(MDOC_ARGS)
int i;
struct roffsu su;
- if (SEC_SYNOPSIS == n->sec) {
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) {
if (n->next && MDOC_In != n->next->tok) {
SCALE_VS_INIT(&su, 1);
bufcat_su(h, "margin-bottom", &su);
@@ -2172,7 +2173,7 @@ mdoc_lb_pre(MDOC_ARGS)
{
struct htmlpair tag;
- if (SEC_SYNOPSIS == n->sec)
+ if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags)
print_otag(h, TAG_DIV, 0, NULL);
PAIR_CLASS_INIT(&tag, "lib");
print_otag(h, TAG_SPAN, 1, &tag);