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 | 8826f3d114038cc6c9e9a877e8d181e900196a15 (patch) | |
tree | 140c83e5fa434eeee853e2ae814fdb1381ca9b50 | |
parent | 83b4f157d4daded80000e151a11815be7bc92575 (diff) | |
download | mandoc-8826f3d114038cc6c9e9a877e8d181e900196a15.tar.gz |
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@.
-rw-r--r-- | mdoc_term.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 2f69eebb..ef17eaf6 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -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; |