diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-08-29 22:40:05 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-08-29 22:40:05 +0000 |
commit | 7794af01645f7ec7af31393921bc662b4e970d47 (patch) | |
tree | 8d224ddaaae5345ecee511bac8d8a38caa81410b | |
parent | 71472a8560e814daaed28a4c8419af566b7da2a1 (diff) | |
download | mandoc-7794af01645f7ec7af31393921bc662b4e970d47.tar.gz mandoc-7794af01645f7ec7af31393921bc662b4e970d47.tar.zst mandoc-7794af01645f7ec7af31393921bc662b4e970d47.zip |
Parse and ignore the escape sequences \, and \/ (italic corrections).
Actually using these is very stupid because they are groff extensions
and other roff(7) implementations typically print unintended characters
at the places where they are used.
Nevertheless, some manuals contain them, for example ocserv(8).
Problem reported by Kurt Jaeger <pi at FreeBSD>.
-rw-r--r-- | mandoc.c | 6 | ||||
-rw-r--r-- | roff.7 | 10 |
2 files changed, 13 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandoc.c,v 1.92 2015/02/20 23:55:10 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.93 2015/08/29 22:40:05 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -95,6 +95,10 @@ mandoc_escape(const char **end, const char **start, int *sz) case 'd': /* FALLTHROUGH */ case 'u': + /* FALLTHROUGH */ + case ',': + /* FALLTHROUGH */ + case '/': return(ESCAPE_IGNORE); /* @@ -1,7 +1,7 @@ -.\" $Id: roff.7,v 1.73 2015/08/29 21:37:20 schwarze Exp $ +.\" $Id: roff.7,v 1.74 2015/08/29 22:40:05 schwarze Exp $ .\" .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> -.\" Copyright (c) 2010, 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> +.\" Copyright (c) 2010, 2011, 2013-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 @@ -1839,9 +1839,15 @@ For short names, there are variants .No \e* Ns Ar c and .No \e*( Ns Ar cc . +.Ss \e, +Left italic correction (groff extension); ignored by +.Xr mandoc 1 . .Ss \e- Special character .Dq mathematical minus sign . +.Ss \e/ +Right italic correction (groff extension); ignored by +.Xr mandoc 1 . .Ss \e[ Ns Ar name ] .Sx Special Characters with names of arbitrary length, see |