diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2022-06-03 12:15:55 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2022-06-03 12:15:55 +0000 |
commit | ccdf39d9cb63bb341dbb5c88c9090ac8e05b350c (patch) | |
tree | 8205e38fed18628857329eecdbd4fda63c7ae21d /regress/roff/nr/escname.out_ascii | |
parent | 3b52bb8d03ff61274832867c905a80a2761859aa (diff) | |
download | mandoc-ccdf39d9cb63bb341dbb5c88c9090ac8e05b350c.tar.gz mandoc-ccdf39d9cb63bb341dbb5c88c9090ac8e05b350c.tar.zst mandoc-ccdf39d9cb63bb341dbb5c88c9090ac8e05b350c.zip |
During identifier parsing, handle undefined escape sequences
in the same way as groff:
* \\ is always reduced to \
* \. is always reduced to .
* other undefined escape sequences are usually reduced to the escape name,
for example \G to G, except during the expansion of expanding escape
sequences having the standard argument form (in particular \* and \n),
in which case the backslash is preserved literally.
Yes, this is confusing indeed.
For example, the following have the same meaning:
* .ds \. and .ds . which is not the same as .ds \\.
* \*[\.] and \*[.] which is not the same as \*[\\.]
* .ds \G and .ds G which is not the same as .ds \\G
* \*[\G] and \*[\\G] which is not the same as \*[G] <- sic!
To feel less dirty, have a leaning toothpick, if you are so inclined.
This patch also slightly improves the string shown by the "escaped
character not allowed in a name" error message.
Diffstat (limited to 'regress/roff/nr/escname.out_ascii')
-rw-r--r-- | regress/roff/nr/escname.out_ascii | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/roff/nr/escname.out_ascii b/regress/roff/nr/escname.out_ascii index ca2d50f5..d0301af9 100644 --- a/regress/roff/nr/escname.out_ascii +++ b/regress/roff/nr/escname.out_ascii @@ -4,7 +4,7 @@ NNAAMMEE nr-escname - escape sequences in register names DDEESSCCRRIIPPTTIIOONN - 1 2 3 + 1 2 3 5 6 0 2 3 @@ -12,4 +12,4 @@ DDEESSCCRRIIPPTTIIOONN incomplete: -OpenBSD June 29, 2014 NR-ESCNAME(1) +OpenBSD June 3, 2022 NR-ESCNAME(1) |