]> git.cameronkatri.com Git - mandoc.git/blobdiff - mandoc.c
delete some TODO entries that were already fixed
[mandoc.git] / mandoc.c
index 4975df006380fa971c67391878f9e466c32cadb4..0619420cb19615da2a3fa53519aad8e2fd163f1a 100644 (file)
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/*     $Id: mandoc.c,v 1.90 2015/01/01 18:11:45 schwarze Exp $ */
+/*     $Id: mandoc.c,v 1.92 2015/02/20 23:55:10 schwarze Exp $ */
 /*
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -156,16 +156,18 @@ mandoc_escape(const char **end, const char **start, int *sz)
                /* FALLTHROUGH */
        case 'D':
                /* FALLTHROUGH */
-       case 'o':
-               /* FALLTHROUGH */
        case 'R':
                /* FALLTHROUGH */
        case 'X':
                /* FALLTHROUGH */
        case 'Z':
-               if ('\0' == **start)
-                       return(ESCAPE_ERROR);
                gly = ESCAPE_IGNORE;
+               /* FALLTHROUGH */
+       case 'o':
+               if (**start == '\0')
+                       return(ESCAPE_ERROR);
+               if (gly == ESCAPE_ERROR)
+                       gly = ESCAPE_OVERSTRIKE;
                term = **start;
                *start = ++*end;
                break;
@@ -240,6 +242,14 @@ mandoc_escape(const char **end, const char **start, int *sz)
                        *start = ++*end;
                        term = '\'';
                        break;
+               case '3':
+                       /* FALLTHROUGH */
+               case '2':
+                       /* FALLTHROUGH */
+               case '1':
+                       *sz = (*end)[-1] == 's' &&
+                           isdigit((unsigned char)(*end)[1]) ? 2 : 1;
+                       break;
                default:
                        *sz = 1;
                        break;