source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: A `%T' invoked outside of `Rs' should not produce trailing
@ 2010-09-25 16:41 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-09-25 16:41 UTC (permalink / raw)
  To: source

Log Message:
-----------
A `%T' invoked outside of `Rs' should not produce trailing punctuation.
This from a TODO entry.  Also stripped the superfluous NOSPACE, which is
handled in term_word() or print_text() anyway.

Modified Files:
--------------
    mdocml:
        TODO
        mdoc_html.c
        mdoc_term.c

Revision Data
-------------
Index: TODO
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v
retrieving revision 1.50
retrieving revision 1.51
diff -LTODO -LTODO -u -p -r1.50 -r1.51
--- TODO
+++ TODO
@@ -149,10 +149,6 @@
   there is no point in rendering two commata,
   see the first paragraph of the DESCRIPTION in OpenBSD mount_nfs(8).
 
-- When .%T is used outside an .Rs context and without a trailing comma,
-  no comma should be rendered at all,
-  see the first paragraph of the DESCRIPTION in OpenBSD exports(5).
-
 - Bogus .Pp before .Bl should not cause a double blank line,
   see "The route utility provides the following simple commands:"
   in OpenBSD route(8).
Index: mdoc_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.105 -r1.106
--- mdoc_html.c
+++ mdoc_html.c
@@ -2263,7 +2263,9 @@ mdoc__x_post(MDOC_ARGS)
 
 	/* TODO: %U */
 
-	h->flags |= HTML_NOSPACE;
+	if (NULL == n->parent || MDOC_Rs != n->parent->tok)
+		return;
+
 	print_text(h, n->next ? "," : ".");
 }
 
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.186
retrieving revision 1.187
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.186 -r1.187
--- mdoc_term.c
+++ mdoc_term.c
@@ -2130,7 +2130,9 @@ termp____post(DECL_ARGS)
 
 	/* TODO: %U. */
 
-	p->flags |= TERMP_NOSPACE;
+	if (NULL == n->parent || MDOC_Rs != n->parent->tok)
+		return;
+
 	if (NULL == n->next) {
 		term_word(p, ".");
 		p->flags |= TERMP_SENTENCE;
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-25 16:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-25 16:41 mdocml: A `%T' invoked outside of `Rs' should not produce trailing kristaps

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).