aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-25 22:45:33 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-25 22:45:33 +0000
commit7dd670bb3cc80a06037265c0b6a07cc3047260db (patch)
treebf6b735df22ff0aae06abb351c7023994c9d1079 /mandoc.c
parent92d53bb9232ffcb0db5e1e830d7ccc3d5c4ad92d (diff)
downloadmandoc-7dd670bb3cc80a06037265c0b6a07cc3047260db.tar.gz
mandoc-7dd670bb3cc80a06037265c0b6a07cc3047260db.tar.zst
mandoc-7dd670bb3cc80a06037265c0b6a07cc3047260db.zip
Parse and ignore the roff(7) escape sequences \d (move half line down)
und \u (move half line up). Found by bentley@ in some DocBook crap.
Diffstat (limited to 'mandoc.c')
-rw-r--r--mandoc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mandoc.c b/mandoc.c
index 80a20651..da953214 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc.c,v 1.71 2013/12/25 00:50:05 schwarze Exp $ */
+/* $Id: mandoc.c,v 1.72 2013/12/25 22:45:33 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -102,6 +102,14 @@ mandoc_escape(const char const **end, const char const **start, int *sz)
break;
/*
+ * Escapes taking no arguments at all.
+ */
+ case ('d'):
+ /* FALLTHROUGH */
+ case ('u'):
+ return(ESCAPE_IGNORE);
+
+ /*
* The \z escape is supposed to output the following
* character without advancing the cursor position.
* Since we are mostly dealing with terminal mode,