From 7dd670bb3cc80a06037265c0b6a07cc3047260db Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 25 Dec 2013 22:45:33 +0000 Subject: 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. --- mandoc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mandoc.c') 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 * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -101,6 +101,14 @@ mandoc_escape(const char const **end, const char const **start, int *sz) term = '\''; 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. -- cgit v1.2.3-56-ge451