summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/roff.c b/roff.c
index 705fddeb..05873d89 100644
--- a/roff.c
+++ b/roff.c
@@ -1214,7 +1214,8 @@ roff_res(struct roff *r, struct buf *buf, int ln, int pos)
/* Discard normal comments. */
- while (stesc > start && stesc[-1] == ' ')
+ while (stesc > start && stesc[-1] == ' ' &&
+ (stesc == start + 1 || stesc[-2] != '\\'))
stesc--;
*stesc = '\0';
break;