From 49047e97c9b6560e0920295cb97a381baacf1977 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 7 Apr 2014 17:51:10 +0000 Subject: Accept arbitrary argument delimiters for various roff(7) escape sequences. Needed for example by the new Perl pod2man(1) preamble. --- mandoc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mandoc.c b/mandoc.c index c709f23b..c2e217c4 100644 --- a/mandoc.c +++ b/mandoc.c @@ -179,11 +179,11 @@ mandoc_escape(const char **end, const char **start, int *sz) case ('X'): /* FALLTHROUGH */ case ('Z'): - if ('\'' != **start) + if ('\0' == **start) return(ESCAPE_ERROR); gly = ESCAPE_IGNORE; + term = **start; *start = ++*end; - term = '\''; break; /* @@ -203,11 +203,11 @@ mandoc_escape(const char **end, const char **start, int *sz) case ('v'): /* FALLTHROUGH */ case ('x'): - if ('\'' != **start) + if (strchr("\0 %&()*+-./0123456789:<=>", **start)) return(ESCAPE_ERROR); gly = ESCAPE_IGNORE; + term = **start; *start = ++*end; - term = '\''; break; /* -- cgit