source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Closing delimiters only suppress spacing when they follow
@ 2011-04-25  0:03 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2011-04-25  0:03 UTC (permalink / raw)
  To: source

Log Message:
-----------
Closing delimiters only suppress spacing when they follow something.
Fixing a regression introduced in rev. 1.105.
ok and prodding for comments kristaps@.

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

Revision Data
-------------
Index: mdoc_macro.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_macro.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.107 -r1.108
--- mdoc_macro.c
+++ mdoc_macro.c
@@ -600,7 +600,19 @@ dword(struct mdoc *m, int line, 
 
 	if (DELIM_OPEN == d)
 		m->last->flags |= MDOC_DELIMO;
-	else if (DELIM_CLOSE == d)
+
+	/*
+	 * Closing delimiters only suppress the preceding space
+	 * when they follow something, not when they start a new
+	 * block or element, and not when they follow `No'.
+	 *
+	 * XXX	Explicitly special-casing MDOC_No here feels
+	 *	like a layering violation.  Find a better way
+	 *	and solve this in the code related to `No'!
+	 */
+
+	else if (DELIM_CLOSE == d && m->last->prev &&
+			m->last->prev->tok != MDOC_No)
 		m->last->flags |= MDOC_DELIMC;
 
 	return(1);
--
 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:[~2011-04-25  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-25  0:03 mdocml: Closing delimiters only suppress spacing when they follow schwarze

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