summaryrefslogtreecommitdiffstats
path: root/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-06 08:28:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-06 08:28:35 +0000
commit7dfb85a6973abe199100f8b965b4751bd3516595 (patch)
tree06529cb808bdbb40056ae9490c37683cac4ec68f /man_macro.c
parent0c49342c6e879353195f2df060ebceb497f66497 (diff)
downloadmandoc-7dfb85a6973abe199100f8b965b4751bd3516595.tar.gz
better error reporting for .br .fi .nf with arguments
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 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;