diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-19 08:28:48 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-19 08:28:48 +0000 |
commit | 348ece844e87e9c8a410043acd6d6937105ef778 (patch) | |
tree | 3c5468f06881573f2412e5d647be92a5c38e7934 /mdoc_macro.c | |
parent | 45f311c11c235a6858422b22d1de047950537ad4 (diff) | |
download | mandoc-348ece844e87e9c8a410043acd6d6937105ef778.tar.gz |
Explicit-close macros now only warn when encountering trailing terms, not
error out (try `.Ed foo').
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index a551e19e..08943960 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -662,13 +662,13 @@ blk_exp_close(MACRO_PROT_ARGS) } if ( ! (MDOC_CALLABLE & mdoc_macros[tok].flags)) { - if (0 == buf[*pos]) { - if ( ! rew_subblock(MDOC_BODY, mdoc, - tok, line, ppos)) + if (buf[*pos]) + if ( ! mdoc_pwarn(mdoc, line, ppos, ENOLINE)) return(0); - return(rew_expblock(mdoc, tok, line, ppos)); - } - return(mdoc_perr(mdoc, line, ppos, ENOLINE)); + + if ( ! rew_subblock(MDOC_BODY, mdoc, tok, line, ppos)) + return(0); + return(rew_expblock(mdoc, tok, line, ppos)); } if ( ! rew_subblock(MDOC_BODY, mdoc, tok, line, ppos)) |