From d672f8cb82878baf3834e938c4c416f4493952cf Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 15 Dec 2018 19:30:25 +0000 Subject: Several improvements to escape sequence handling. * Add the missing special character \_ (underscore). * Partial implementations of \a (leader character) and \E (uninterpreted escape character). * Parse and ignore \r (reverse line feed). * Add a WARNING message about undefined escape sequences. * Add an UNSUPP message about unsupported escape sequences. * Mark \! and \? (transparent throughput) and \O (suppress output) as unsupported. * Treat the various variants of zero-width spaces as one-byte escape sequences rather than as special characters, to avoid defining bogus forms with square brackets. * For special characters with one-byte names, do not define bogus forms with square brackets, except for \[-], which is valid. * In the form with square brackets, undefined special characters do not fall back to printing the name verbatim, not even for one-byte names. * Starting a special character name with a blank is an error. * Undefined escape sequences never abort formatting of the input string, not even in HTML output mode. * Document the newly handled escapes, and a few that were missing. * Regression tests for most of the above. --- mandoc_char.7 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mandoc_char.7') diff --git a/mandoc_char.7 b/mandoc_char.7 index 8fe71b0c..578f37f1 100644 --- a/mandoc_char.7 +++ b/mandoc_char.7 @@ -1,8 +1,8 @@ -.\" $Id: mandoc_char.7,v 1.74 2018/08/21 01:59:22 schwarze Exp $ +.\" $Id: mandoc_char.7,v 1.75 2018/12/15 19:30:26 schwarze Exp $ .\" .\" Copyright (c) 2003 Jason McIntyre .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons -.\" Copyright (c) 2011, 2013, 2015, 2017 Ingo Schwarze +.\" Copyright (c) 2011,2013,2015,2017,2018 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 21 2018 $ +.Dd $Mdocdate: December 15 2018 $ .Dt MANDOC_CHAR 7 .Os .Sh NAME @@ -266,11 +266,13 @@ Spacing: .It Em Input Ta Em Description .It Sq \e\ \& Ta unpaddable non-breaking space .It \e\(ti Ta paddable non-breaking space -.It \e0 Ta unpaddable, breaking digit-width space +.It \e0 Ta digit-width space allowing line break .It \e| Ta one-sixth \e(em narrow space, zero width in nroff mode .It \e^ Ta one-twelfth \e(em half-narrow space, zero width in nroff -.It \e& Ta zero-width space +.It \e& Ta zero-width non-breaking space +.It \e) Ta zero-width space transparent to end-of-sentence detection .It \e% Ta zero-width space allowing hyphenation +.It \e: Ta zero-width space allowing line break .El .Pp Lines: -- cgit v1.2.3