From df65ac42a497f4acfc4cf57335efee9070d1c8a2 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 28 Feb 2009 20:13:06 +0000 Subject: More fixes (hard-escapes, etc.). --- mdocterm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mdocterm.c') diff --git a/mdocterm.c b/mdocterm.c index 398794ca..dd52e287 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.20 2009/02/28 20:13:06 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -554,7 +554,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); -- cgit v1.2.3