summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mandoc/mdoc_macro.c')
-rw-r--r--usr.bin/mandoc/mdoc_macro.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c
index 7371b8c8b27..da05e3ac2f0 100644
--- a/usr.bin/mandoc/mdoc_macro.c
+++ b/usr.bin/mandoc/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.70 2011/10/16 12:18:32 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.71 2011/12/03 22:47:27 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -596,6 +596,17 @@ dword(struct mdoc *m, int line,
if (DELIM_OPEN == d)
m->last->flags |= MDOC_DELIMO;
+
+ /*
+ * 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;