]> git.cameronkatri.com Git - mandoc.git/blobdiff - strings.c
Added new old escape sequence \*[nn].
[mandoc.git] / strings.c
index 4910e308c7f077e3d720a333a444e835a3a3595d..6d07edeae2ff71b65fa0312c592b866ef836b83a 100644 (file)
--- a/strings.c
+++ b/strings.c
@@ -1,4 +1,4 @@
-/* $Id: strings.c,v 1.23 2009/03/02 12:09:32 kristaps Exp $ */
+/* $Id: strings.c,v 1.24 2009/03/02 17:14:46 kristaps Exp $ */
 /*
  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -69,6 +69,11 @@ mdoc_isescape(const char *p)
                        if (0 == *++p || ! isgraph((int)*p))
                                return(0);
                        return(4);
+               case ('['):
+                       for (c = 3, p++; *p && ']' != *p; p++, c++)
+                               if ( ! isgraph((int)*p))
+                                       break;
+                       return(*p == ']' ? c : 0);
                default:
                        break;
                }