summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 1a9dce2b..98e6a77d 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1076,6 +1076,7 @@ static void
post_nd(POST_ARGS)
{
struct roff_node *n;
+ size_t sz;
n = mdoc->last;
@@ -1089,6 +1090,11 @@ post_nd(POST_ARGS)
if (n->child == NULL)
mandoc_msg(MANDOCERR_ND_EMPTY, mdoc->parse,
n->line, n->pos, "Nd");
+ else if (n->last->type == ROFFT_TEXT &&
+ (sz = strlen(n->last->string)) != 0 &&
+ n->last->string[sz - 1] == '.')
+ mandoc_msg(MANDOCERR_ND_DOT, mdoc->parse,
+ n->last->line, n->last->pos + sz - 1, NULL);
post_hyph(mdoc);
}