aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit7f67988eac2d1c3957c780d882706906cbb3b441 (patch)
treeb4526ffa0e17b6ebc86b96b943b82f6375387e0a /mdoc_term.c
parent67a51824265c8e0d0f41e8cacb1714e5671c7053 (diff)
downloadmandoc-7f67988eac2d1c3957c780d882706906cbb3b441.tar.gz
mandoc-7f67988eac2d1c3957c780d882706906cbb3b441.tar.zst
mandoc-7f67988eac2d1c3957c780d882706906cbb3b441.zip
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.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 2c161d65..567d9aad 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.138 2010/06/04 21:49:39 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.139 2010/06/04 22:16:27 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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);
}