summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-31 22:40:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-31 22:40:12 +0000
commitbe3cd034f5ca97ad2872d535487f43449fb84e8c (patch)
treeece424535f715959ce54d14512abf5cc718c366a /mdoc_macro.c
parent133205211920eb2d591861a6cf2483f90ae82f28 (diff)
downloadmandoc-be3cd034f5ca97ad2872d535487f43449fb84e8c.tar.gz
Do not trigger end-of-sentence spacing by trailing punctuation
at the end of partial implicit macros. Prodded by jmc@. Actually, this is a revert of rev. 1.64 Fri May 14 14:09:13 2010 UTC by kristaps@, with this original commit message: "Block-implicit macros now up-propogate end-of-sentence spacing. NOTE: GROFF IS NOT SMART ENOUGH TO DO THIS." Please speak after me: Then why the hell should we? We already weakened this in rev. 1.93 Sun Jul 18 17:00:26 2010 UTC, but that weakening was insufficient. Let's take it out completely. Admittedly, there are two places in OpenBSD base where what Kristaps did make the output nicer, in calloc(3) and in fish(6). But both are atypical. There are 18 other places where this revert makes the output nicer, the typical case being: "Mail status is shown as ``No Mail.'' if there is no mail." You do *not* want the EOS spacing after ``No Mail.'' in that sentence.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index cc75b7e7..9d891ecf 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1349,25 +1349,6 @@ blk_part_imp(MACRO_PROT_ARGS)
body = mdoc->last;
}
- for (n = body->child; n && n->next; n = n->next)
- /* Do nothing. */ ;
-
- /*
- * End of sentence spacing: if the last node is a text node and
- * has a trailing period, then mark it as being end-of-sentence.
- */
-
- if (n && MDOC_TEXT == n->type && n->string)
- if (mandoc_eos(n->string, strlen(n->string), 1))
- n->flags |= MDOC_EOS;
-
- /* Up-propagate the end-of-space flag. */
-
- if (n && (MDOC_EOS & n->flags)) {
- body->flags |= MDOC_EOS;
- body->parent->flags |= MDOC_EOS;
- }
-
/*
* If there is an open sub-block requiring explicit close-out,
* postpone closing out the current block