groff/makevarescape.sed
Lennart Jablonka 7ae45a1d4c Don't use non-POSIX \+ syntax in BREs.
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>.
2025-04-11 06:15:45 -05:00

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