summaryrefslogtreecommitdiffstats
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
commita98d254132a47ab6826511a1ab1dcd7763e588c1 (patch)
treeb6e0eefa78a9c996784f24ae09faaa1ee920057a /mdoc.c
parent5b800687386963e8ac308abec4e60dace556292c (diff)
downloadmandoc-a98d254132a47ab6826511a1ab1dcd7763e588c1.tar.gz
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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index 38988dbe..9ec50720 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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';