-/* $Id: mdoc_macro.c,v 1.177 2015/02/06 01:07:22 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.180 2015/02/07 16:42:33 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
mdoc_macronames[tok],
mdoc_macronames[n->tok]);
rew_pending(mdoc, n);
+ n = mdoc->last;
continue;
case MDOC_It:
/* Delay in case it's astray. */
rew_last(mdoc, mdoc->last->parent);
}
+ if (buf[*pos] == '\0' &&
+ (tok == MDOC_Fd || mdoc_macronames[tok][0] == '%')) {
+ mandoc_msg(MANDOCERR_MACRO_EMPTY, mdoc->parse,
+ line, ppos, mdoc_macronames[tok]);
+ return;
+ }
+
mdoc_argv(mdoc, line, tok, &arg, pos, buf);
mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
if (parse_rest(mdoc, tok, line, pos, buf))