diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-21 21:55:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-21 21:55:33 +0000 |
commit | 4c2b73111562cd3b6e5744162ecbd5ca4d045661 (patch) | |
tree | d1c22c93846951fe38cd2f4821d48c1f21128698 /mdoc_term.c | |
parent | 1b939f3fc9a59c4dd5ac04a9c995a8457d4ee32a (diff) | |
download | mandoc-4c2b73111562cd3b6e5744162ecbd5ca4d045661.tar.gz mandoc-4c2b73111562cd3b6e5744162ecbd5ca4d045661.tar.zst mandoc-4c2b73111562cd3b6e5744162ecbd5ca4d045661.zip |
In the SYNOPSIS, .Nm at the beginning of an input line starts
an .Nm block, and gets special handling (new line, indentation).
But .Nm in the middle of a line is just a normal in-line element,
so make sure it does NOT get the special handling.
Partly fixes the test(1) SYNOPSIS; indentation after "[" is still
excessive, which is an unrelated and more difficult issue.
Reminded of the problem by jmc@;
OK kristaps@.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 9339ed68..fdf7f737 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.176 2010/07/19 11:11:54 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.177 2010/07/21 21:55:33 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -1026,7 +1026,8 @@ termp_nm_pre(DECL_ARGS) if (NULL == n->child && NULL == m->name) return(0); - synopsis_pre(p, n); + if (MDOC_HEAD == n->type) + synopsis_pre(p, n->parent); if (MDOC_HEAD == n->type && n->next->child) { p->flags |= TERMP_NOSPACE | TERMP_NOBREAK | TERMP_HANG; |