summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index cfc32caf..80023269 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -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);