summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-04 22:16:27 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-04 22:16:27 +0000
commit60594285aadf7b17048d8d3b552c3b12563f3622 (patch)
tree3cac3cd457e34ddd0ba29522fd90c9818cb0538d /mdoc_term.c
parent14deda6326abdec269681291139d0ae022db56f9 (diff)
downloadmandoc-60594285aadf7b17048d8d3b552c3b12563f3622.tar.gz
Fixed `Fn' newline behaviour and added some regression tests to this
extent. Documented `Fn'. Please note the COMPATIBILITY note regarding historic groff.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 6f67f621..63f63186 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1536,6 +1536,12 @@ termp_fn_pre(DECL_ARGS)
{
const struct mdoc_node *nn;
+ /* NB: MDOC_LINE has no effect on this macro! */
+ if (SEC_SYNOPSIS == n->sec) {
+ if (n->prev)
+ term_vspace(p);
+ }
+
term_fontpush(p, TERMFONT_BOLD);
term_word(p, n->child->string);
term_fontpop(p);
@@ -1566,8 +1572,9 @@ static void
termp_fn_post(DECL_ARGS)
{
- if (n->sec == SEC_SYNOPSIS && n->next && MDOC_LINE & n->flags)
- term_vspace(p);
+ /* NB: MDOC_LINE has no effect on this macro! */
+ if (SEC_SYNOPSIS == n->sec)
+ term_newln(p);
}