diff options
author | 2010-07-16 00:34:33 +0000 | |
---|---|---|
committer | 2010-07-16 00:34:33 +0000 | |
commit | a5f9a6eadb3286c7373c3f6944bcc1fc436a5539 (patch) | |
tree | 2fdb474659a3cc8415335f76b883395a2a9a1eb8 /usr.bin/mandoc/mdoc_macro.c | |
parent | After .Sm on, spacing ought to restart right away, before the next token, (diff) | |
download | wireguard-openbsd-a5f9a6eadb3286c7373c3f6944bcc1fc436a5539.tar.xz wireguard-openbsd-a5f9a6eadb3286c7373c3f6944bcc1fc436a5539.zip |
Text ending in a full stop, exclamation mark or question mark
should not flag the end of a sentence if:
1) The punctuation is followed by closing delimiters
and not preceded by alphanumeric characters, like in
"There is no full stop (.) in this sentence"
or
2) The punctuation is a child of a macro
and not preceded by alphanumeric characters, like in
"There is no full stop
.Pq \&.
in this sentence"
jmc@ and sobrado@ like this
Diffstat (limited to 'usr.bin/mandoc/mdoc_macro.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index c145394864b..b258157da05 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.54 2010/07/13 01:09:13 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.55 2010/07/16 00:34:33 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -606,7 +606,7 @@ append_delims(struct mdoc *m, int line, int *pos, char *buf) * knowing which symbols break this behaviour, for * example, `. ;' shouldn't propogate the double-space. */ - if (mandoc_eos(p, strlen(p))) + if (mandoc_eos(p, strlen(p), 0)) m->last->flags |= MDOC_EOS; } @@ -1262,7 +1262,7 @@ blk_part_imp(MACRO_PROT_ARGS) */ if (n && MDOC_TEXT == n->type && n->string) - if (mandoc_eos(n->string, strlen(n->string))) + if (mandoc_eos(n->string, strlen(n->string), 1)) n->flags |= MDOC_EOS; /* Up-propogate the end-of-space flag. */ |