summaryrefslogtreecommitdiff
path: root/mandoc.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-06-08 19:29:07 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-06-08 19:29:07 +0000
commit7ad21139cd51f34b1749abea843f7f513b4a6410 (patch)
tree75256d41669ecdcdfe88b3f6d39c3b1691451b8f /mandoc.c
parent6cae2c9f93ec8d6e7a8bce06b82bed67f2d6450b (diff)
Diffstat (limited to 'mandoc.c')
-rw-r--r--mandoc.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/mandoc.c b/mandoc.c
index d265463b4efeb..fc360def79e21 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,7 +1,7 @@
-/* $Id: mandoc.c,v 1.98 2015/11/12 22:44:27 schwarze Exp $ */
+/* $Id: mandoc.c,v 1.100 2017/06/02 19:21:23 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011-2015, 2017 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
@@ -175,7 +175,17 @@ mandoc_escape(const char **end, const char **start, int *sz)
++*end;
return ESCAPE_ERROR;
}
- gly = ESCAPE_IGNORE;
+ switch ((*start)[-1]) {
+ case 'h':
+ gly = ESCAPE_HORIZ;
+ break;
+ case 'l':
+ gly = ESCAPE_HLINE;
+ break;
+ default:
+ gly = ESCAPE_IGNORE;
+ break;
+ }
term = **start;
*start = ++*end;
break;