aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-08-29 11:29:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-08-29 11:29:51 +0000
commite5b395c743b2bac472ad457fa3dd62a5956261c6 (patch)
treed3966841c43e3608d7b7584d6a75cb55b7268b63 /mdoc.c
parent3ea3625363ef1d13288de47e35bfb037d130d3f5 (diff)
downloadmandoc-e5b395c743b2bac472ad457fa3dd62a5956261c6.tar.gz
mandoc-e5b395c743b2bac472ad457fa3dd62a5956261c6.tar.zst
mandoc-e5b395c743b2bac472ad457fa3dd62a5956261c6.zip
Allow `.xx\}' where xx is a macro (e.g., `.br\}') to close scope. This is
experimental and hasn't been rigorously tested. It's only implemented in -mdoc for the time being. This is absolutely required for pod2man. It does, however, make the pod2man preamble be processed in full.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mdoc.c b/mdoc.c
index f8b09f7a..bee01503 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.163 2010/08/20 01:02:07 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.164 2010/08/29 11:29:51 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -758,11 +758,14 @@ mdoc_pmacro(struct mdoc *m, int ln, char *buf, int offs)
/*
* Copy the first word into a nil-terminated buffer.
- * Stop copying when a tab, space, or eoln is encountered.
+ * Stop copying when a tab, space, backslash, or eoln is encountered.
*/
j = 0;
- while (j < 4 && '\0' != buf[i] && ' ' != buf[i] && '\t' != buf[i])
+ while (j < 4 && '\0' != buf[i] &&
+ ' ' != buf[i] &&
+ '\t' != buf[i] &&
+ '\\' != buf[i])
mac[j++] = buf[i++];
mac[j] = '\0';