diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-18 17:00:26 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-18 17:00:26 +0000 |
commit | 0b38528b1ed620cf8afcbd2dc24687537a6d863f (patch) | |
tree | 55d6f8e4a7e3cfcba996cb4054255a17ae58b1b9 /mdoc_macro.c | |
parent | 29ae66f24ac7fa681d22a8d5315e2faf09350baf (diff) | |
download | mandoc-0b38528b1ed620cf8afcbd2dc24687537a6d863f.tar.gz |
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"
"looks fine" to kristaps@; tested by jmc@ and sobrado@
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index 0dede49e..d5e946cb 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -610,7 +610,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; } @@ -1266,7 +1266,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. */ |