diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2012-11-18 00:05:35 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2012-11-18 00:05:35 +0000 |
commit | 24999e02cb489a8e3d5df9fd7000905e9be9e30d (patch) | |
tree | c95e280ae59c93e494f5bac4b3912bc8bd85d6fb | |
parent | 1f03d7beeffd15115d82eff4add4681db338cdd1 (diff) | |
download | mandoc-24999e02cb489a8e3d5df9fd7000905e9be9e30d.tar.gz |
Fix four small whitespace issues related to trailing punctuation
reported by Nicolas Joly <njoly at pasteur dot fr>:
- add EOS spacing after trailing punctuation after .Cd, .Fc, and .Lb
- suppress spacing before trailing punctuation after .Fd
Add the remaining issues from the same report to the TODO file.
-rw-r--r-- | TODO | 9 | ||||
-rw-r--r-- | mdoc_argv.c | 6 | ||||
-rw-r--r-- | mdoc_macro.c | 3 |
3 files changed, 14 insertions, 4 deletions
@@ -200,6 +200,11 @@ of in_line() - put trailing punctuation out of scope. Found in mount_nfs(8) and exports(5), search for "Appendix". +- Trailing punctuation after .%T triggers EOS spacing, at least + outside .Rs (eek!). Simply setting ARGSFL_DELIM for .%T is not + the right solution, it sends mandoc into an endless loop. + reported by Nicolas Joly Sat, 17 Nov 2012 11:49:54 +0100 + - in enclosures, mandoc sometimes fancies a bogus end of sentence reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059 @@ -228,6 +233,10 @@ in between, see for example tmux(1). reported by nicm@ 13 Jan 2011 00:18:57 +0000 +- Trailing punctuation after .It should trigger EOS spacing. + reported by Nicolas Joly Sat, 17 Nov 2012 11:49:54 +0100 + Probably, this should be fixed somewhere in termp_it_pre(), not sure. + - .Nx 1.0a should be "NetBSD 1.0A", not "NetBSD 1.0a", see OpenBSD ccdconfig(8). diff --git a/mdoc_argv.c b/mdoc_argv.c index b9cff265..55ecdc4a 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -161,7 +161,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = { { ARGSFL_DELIM, NULL }, /* Ad */ { ARGSFL_DELIM, args_An }, /* An */ { ARGSFL_DELIM, NULL }, /* Ar */ - { ARGSFL_NONE, NULL }, /* Cd */ + { ARGSFL_DELIM, NULL }, /* Cd */ { ARGSFL_DELIM, NULL }, /* Cm */ { ARGSFL_DELIM, NULL }, /* Dv */ { ARGSFL_DELIM, NULL }, /* Er */ @@ -241,7 +241,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = { { ARGSFL_DELIM, NULL }, /* Xc */ { ARGSFL_NONE, NULL }, /* Xo */ { ARGSFL_NONE, NULL }, /* Fo */ - { ARGSFL_NONE, NULL }, /* Fc */ + { ARGSFL_DELIM, NULL }, /* Fc */ { ARGSFL_NONE, NULL }, /* Oo */ { ARGSFL_DELIM, NULL }, /* Oc */ { ARGSFL_NONE, args_Bk }, /* Bk */ @@ -250,7 +250,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = { { ARGSFL_NONE, NULL }, /* Hf */ { ARGSFL_NONE, NULL }, /* Fr */ { ARGSFL_NONE, NULL }, /* Ud */ - { ARGSFL_NONE, NULL }, /* Lb */ + { ARGSFL_DELIM, NULL }, /* Lb */ { ARGSFL_NONE, NULL }, /* Lp */ { ARGSFL_DELIM, NULL }, /* Lk */ { ARGSFL_DELIM, NULL }, /* Mt */ diff --git a/mdoc_macro.c b/mdoc_macro.c index f8608764..e946d7ab 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -612,7 +612,8 @@ dword(struct mdoc *mdoc, int line, */ else if (DELIM_CLOSE == d && mdoc->last->prev && - mdoc->last->prev->tok != MDOC_No) + mdoc->last->prev->tok != MDOC_No && + mdoc->last->parent->tok != MDOC_Fd) mdoc->last->flags |= MDOC_DELIMC; return(1); |