From 7dfb85a6973abe199100f8b965b4751bd3516595 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 6 Feb 2015 08:28:35 +0000 Subject: better error reporting for .br .fi .nf with arguments --- man_macro.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'man_macro.c') diff --git a/man_macro.c b/man_macro.c index 39e219dc..6ed50df7 100644 --- a/man_macro.c +++ b/man_macro.c @@ -420,6 +420,13 @@ in_line_eoln(MACRO_PROT_ARGS) n = man->last; for (;;) { + if (buf[*pos] != '\0' && (tok == MAN_br || + tok == MAN_fi || tok == MAN_nf)) { + mandoc_vmsg(MANDOCERR_ARG_SKIP, + man->parse, line, *pos, "%s %s", + man_macronames[tok], buf + *pos); + break; + } la = *pos; if ( ! man_args(man, line, pos, buf, &p)) break; -- cgit