mirror of
https://https.git.savannah.gnu.org/git/groff.git
synced 2026-01-26 15:39:07 +00:00
It's implementation-defined whether \+ behaves like literal + or like
\{1,\}. (The same applies to \? and \|; I didn't find uses of those.)
As it happens, OpenBSD treats it as literal '+'.
Found it through a failure of html-device-smoke-test.sh.
See <https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/basedefs/V1_chap09.html#tag_09_03_02>.
10 lines
137 B
Sed
10 lines
137 B
Sed
s/\\/\\\\e/g
|
|
s/ /\\\\ /g
|
|
s/"/\\\\[dq]/g
|
|
s/'/\\\\[aq]/g
|
|
s/-/\\\\&/g
|
|
s/\^/\\\\[ha]/g
|
|
s/`/\\\\[ga]/g
|
|
s/~/\\\\[ti]/g
|
|
s|[^ ]//*|&\\\\:\\\\%|g
|