summaryrefslogtreecommitdiffstats
path: root/man_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/man_macro.c b/man_macro.c
index 6ed50df7..88f1f431 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -427,6 +427,13 @@ in_line_eoln(MACRO_PROT_ARGS)
man_macronames[tok], buf + *pos);
break;
}
+ if (buf[*pos] != '\0' && man->last != n &&
+ (tok == MAN_PD || tok == MAN_ft || tok == MAN_sp)) {
+ mandoc_vmsg(MANDOCERR_ARG_EXCESS,
+ man->parse, line, *pos, "%s ... %s",
+ man_macronames[tok], buf + *pos);
+ break;
+ }
la = *pos;
if ( ! man_args(man, line, pos, buf, &p))
break;