summaryrefslogtreecommitdiffstats
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
commit0bb970a9a79179146e652ca0000b316a13d5db09 (patch)
tree15ad33a77b7ace03ece47d092d53fef1bb7969d3 /mandoc.c
parent6e24f940633ec22b1bf9d57b12da30d9ff04618e (diff)
downloadmandoc-0bb970a9a79179146e652ca0000b316a13d5db09.tar.gz
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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mandoc.c b/mandoc.c
index 8197276c..356260f7 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -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,