aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/roff.c b/roff.c
index 6b736bec..966ed9d5 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.287 2017/01/10 21:59:47 schwarze Exp $ */
+/* $Id: roff.c,v 1.288 2017/01/12 18:02:20 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -1223,16 +1223,12 @@ deroff(char **dest, const struct roff_node *n)
return;
}
- /* Skip leading whitespace and escape sequences. */
+ /* Skip leading whitespace. */
- cp = n->string;
- while (*cp != '\0') {
- if ('\\' == *cp) {
- cp++;
- mandoc_escape((const char **)&cp, NULL, NULL);
- } else if (isspace((unsigned char)*cp))
+ for (cp = n->string; *cp != '\0'; cp++) {
+ if (cp[0] == '\\' && strchr(" %&0^|~", cp[1]) != NULL)
cp++;
- else
+ else if ( ! isspace((unsigned char)*cp))
break;
}