source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Fix four small whitespace issues related to trailing punctuation
Date: Sat, 17 Nov 2012 19:05:36 -0500 (EST)	[thread overview]
Message-ID: <201211180005.qAI05anr032183@krisdoz.my.domain> (raw)

Log Message:
-----------
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.

Modified Files:
--------------
    mdocml:
        TODO
        mdoc_argv.c
        mdoc_macro.c

Revision Data
-------------
Index: TODO
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v
retrieving revision 1.146
retrieving revision 1.147
diff -LTODO -LTODO -u -p -r1.146 -r1.147
--- TODO
+++ TODO
@@ -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
 
@@ -227,6 +232,10 @@
 - If the first line after .It is .D1, do not assert a blank line
   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",
Index: mdoc_macro.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_macro.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.119 -r1.120
--- mdoc_macro.c
+++ 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);
Index: mdoc_argv.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_argv.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -Lmdoc_argv.c -Lmdoc_argv.c -u -p -r1.85 -r1.86
--- mdoc_argv.c
+++ mdoc_argv.c
@@ -161,7 +161,7 @@ static	const struct mdocarg mdocargs[MDO
 	{ 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[MDO
 	{ 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[MDO
 	{ 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 */
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2012-11-18  0:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201211180005.qAI05anr032183@krisdoz.my.domain \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).