aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.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_term.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_term.c')
-rw-r--r--mdoc_term.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 490c3e47..728bdc28 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.121 2010/05/12 16:01:01 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.122 2010/05/13 06:22:11 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1085,7 +1085,7 @@ static int
termp_nm_pre(DECL_ARGS)
{
- if (SEC_SYNOPSIS == n->sec)
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)
term_newln(p);
term_fontpush(p, TERMFONT_BOLD);
@@ -1384,7 +1384,7 @@ static void
termp_fd_post(DECL_ARGS)
{
- if (n->sec != SEC_SYNOPSIS)
+ if (n->sec != SEC_SYNOPSIS || ! (MDOC_LINE & n->flags))
return;
term_newln(p);
@@ -1471,7 +1471,7 @@ static void
termp_lb_post(DECL_ARGS)
{
- if (SEC_LIBRARY == n->sec)
+ if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags)
term_newln(p);
}
@@ -1540,7 +1540,7 @@ static int
termp_ft_pre(DECL_ARGS)
{
- if (SEC_SYNOPSIS == n->sec)
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)
if (n->prev && MDOC_Fo == n->prev->tok)
term_vspace(p);
@@ -1554,7 +1554,7 @@ static void
termp_ft_post(DECL_ARGS)
{
- if (SEC_SYNOPSIS == n->sec)
+ if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)
term_newln(p);
}
@@ -1595,7 +1595,7 @@ static void
termp_fn_post(DECL_ARGS)
{
- if (n->sec == SEC_SYNOPSIS && n->next)
+ if (n->sec == SEC_SYNOPSIS && n->next && MDOC_LINE & n->flags)
term_vspace(p);
}
@@ -1894,7 +1894,7 @@ termp_in_post(DECL_ARGS)
term_word(p, ">");
term_fontpop(p);
- if (SEC_SYNOPSIS != n->sec)
+ if (SEC_SYNOPSIS != n->sec && ! (MDOC_LINE & n->flags))
return;
term_newln(p);