]> git.cameronkatri.com Git - mandoc.git/blobdiff - html.c
In mdoc(7), don't mistreat negative .sp arguments as large positive ones.
[mandoc.git] / html.c
diff --git a/html.c b/html.c
index da9808579a36347313540777410ac6949d5bc221..487dacda947f931be42425df41f333e6dc435244 100644 (file)
--- a/html.c
+++ b/html.c
@@ -1,7 +1,7 @@
-/*     $Id: html.c,v 1.184 2014/12/20 00:20:11 schwarze Exp $ */
+/*     $Id: html.c,v 1.185 2015/01/21 20:33:25 schwarze Exp $ */
 /*
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -307,6 +307,8 @@ html_strlen(const char *cp)
                case ESCAPE_NUMBERED:
                        /* FALLTHROUGH */
                case ESCAPE_SPECIAL:
+                       /* FALLTHROUGH */
+               case ESCAPE_OVERSTRIKE:
                        if (skip)
                                skip = 0;
                        else
@@ -433,6 +435,11 @@ print_encode(struct html *h, const char *p, int norecurse)
                        if ('\0' == *p)
                                nospace = 1;
                        continue;
+               case ESCAPE_OVERSTRIKE:
+                       if (len == 0)
+                               continue;
+                       c = seq[len - 1];
+                       break;
                default:
                        continue;
                }