diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-02 19:55:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-02 19:55:10 +0000 |
commit | fdc95e0f088e210664eb7459003c922102fc748e (patch) | |
tree | 2941a73b51965c3192f9e63b7579762c3e8c0ad5 /mdoc_validate.c | |
parent | e98d951b402f5f61bf0fafc86ae5ad5a03f1c85e (diff) | |
download | mandoc-fdc95e0f088e210664eb7459003c922102fc748e.tar.gz |
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.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index cf75c67a..ecd1ee09 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -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); |