summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roff.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/roff.c b/roff.c
index 8a9e49e9..542272ba 100644
--- a/roff.c
+++ b/roff.c
@@ -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;
}