diff options
author | 2015-02-03 00:48:47 +0000 | |
---|---|---|
committer | 2015-02-03 00:48:47 +0000 | |
commit | 8941fd5eba0e28e04e304385d93590b353c9cffd (patch) | |
tree | 50adec42e3aaec32f49b1a39e7f6810521415590 /mdoc_macro.c | |
parent | 9c1ff92e30bbf53ade8ac6b69affb26c154107cf (diff) | |
download | mandoc-8941fd5eba0e28e04e304385d93590b353c9cffd.tar.gz mandoc-8941fd5eba0e28e04e304385d93590b353c9cffd.tar.zst mandoc-8941fd5eba0e28e04e304385d93590b353c9cffd.zip |
Bring .Pp/.Lp handling inside .Nm blocks closer to groff;
as a bonus, get rid of another call to rew_sub().
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index 192b01a8..8626c3a5 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.169 2015/02/02 19:23:23 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.170 2015/02/03 00:48:47 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -1459,10 +1459,17 @@ in_line_argn(MACRO_PROT_ARGS) static void in_line_eoln(MACRO_PROT_ARGS) { - struct mdoc_arg *arg; + struct mdoc_node *n; + struct mdoc_arg *arg; - if (tok == MDOC_Pp) - rew_sub(MDOC_BLOCK, mdoc, MDOC_Nm, line, ppos); + if ((tok == MDOC_Pp || tok == MDOC_Lp) && + ! (mdoc->flags & MDOC_SYNOPSIS)) { + n = mdoc->last; + if (mdoc->next == MDOC_NEXT_SIBLING) + n = n->parent; + if (n->tok == MDOC_Nm) + rew_last(mdoc, mdoc->last->parent); + } mdoc_argv(mdoc, line, tok, &arg, pos, buf); mdoc_elem_alloc(mdoc, line, ppos, tok, arg); |