A perl script that does appropriate backslash escaping of '-' chars
[rsync/rsync.git] / tweak_manpage
CommitLineData
5e61bdb4
WD
1#!/usr/bin/perl -i -p
2s{(--\w[-\w]+)}{ $x = $1; $x =~ s/-/\\-/g; $x }eg;
3s/(?<!\\)-(['"\d*])/\\-$1/g;
4s/ -- / \\-\\- /g;
5s#(['"(= /,])-#$1\\-#g;
6s/(\\fB)-/$1\\-/g;
7s/(\[\w)-(\w\])/$1\\-$2/g;
8s{(\\f\(CW.*?\\fP)}{ $x = $1; $x =~ s/(?<!\\)-/\\-/g; $x }eg;
9s/(\.\w+)-/$1\\-/g;