From 01c92e6ac259f38d13175f7f9d76233713fff535 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 2 Jul 2014 19:55:10 +0000 Subject: When .Sm is called without an argument, groff toggles the spacing mode, so let us do the same for compatibility. Using this feature is of course not recommended except in manual page obfuscation contests. --- mdoc_validate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mdoc_validate.c') diff --git a/mdoc_validate.c b/mdoc_validate.c index 52bd51b2..e43e00df 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.221 2014/07/02 13:10:45 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.222 2014/07/02 19:55:10 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -1668,11 +1668,12 @@ ebool(struct mdoc *mdoc) { if (NULL == mdoc->last->child) { - mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_MACROEMPTY); - mdoc_node_delete(mdoc, mdoc->last); + if (MDOC_Sm == mdoc->last->tok) + mdoc->flags ^= MDOC_SMOFF; return(1); } - check_count(mdoc, MDOC_ELEM, CHECK_WARN, CHECK_EQ, 1); + + check_count(mdoc, MDOC_ELEM, CHECK_WARN, CHECK_LT, 2); assert(MDOC_TEXT == mdoc->last->child->type); -- cgit v1.2.3-56-ge451