X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/93fa97b1d275fbba5c0d3559dd2b4d8442f78db7..4cff21104a2ef3e2839d80ed72d781b53118962b:/mdocterm.c?ds=sidebyside diff --git a/mdocterm.c b/mdocterm.c index 398794ca..02c80e6c 100644 --- a/mdocterm.c +++ b/mdocterm.c @@ -1,4 +1,4 @@ -/* $Id: mdocterm.c,v 1.19 2009/02/28 14:43:35 kristaps Exp $ */ +/* $Id: mdocterm.c,v 1.21 2009/02/28 21:31:13 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -465,6 +465,10 @@ pescape(struct termp *p, const char *word, size_t *i, size_t len) /* FALLTHROUGH */ case ('.'): chara(p, word[*i]); + break; + case ('e'): + chara(p, '\\'); + break; default: break; } @@ -554,7 +558,14 @@ word(struct termp *p, const char *word) if ( ! xisspace(word[i])) { j++; continue; + } + + /* Escaped spaces don't delimit... */ + if (i > 0 && xisspace(word[i]) && '\\' == word[i - 1]) { + j++; + continue; } + if (0 == j) continue; assert(i >= j);