X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/e1808a26399ba483775f0653731559b644cc6f0f..25662a4940503ffb064a92f60db8cd83050b1878:/mdoc_macro.c diff --git a/mdoc_macro.c b/mdoc_macro.c index 8bc79919..f04acb96 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $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 * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -941,6 +941,7 @@ blk_full(MACRO_PROT_ARGS) mdoc_macronames[tok], mdoc_macronames[n->tok]); rew_pending(mdoc, n); + n = mdoc->last; continue; case MDOC_It: /* Delay in case it's astray. */ @@ -1403,6 +1404,13 @@ in_line_eoln(MACRO_PROT_ARGS) 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))