aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit310ed617af04919775625b014c2aa960f4be781d (patch)
tree852962919a01b63c1a30dfbb895305446cab3840 /mdoc_macro.c
parenta1a285477bfe246897c20026ebecdeec147da12a (diff)
downloadmandoc-310ed617af04919775625b014c2aa960f4be781d.tar.gz
mandoc-310ed617af04919775625b014c2aa960f4be781d.tar.zst
mandoc-310ed617af04919775625b014c2aa960f4be781d.zip
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.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 2a63ca92..ba36227d 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.125 2013/12/24 20:45:27 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.126 2013/12/31 22:40:12 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -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