diff options
Diffstat (limited to 'contrib/groff/tmac/strip.sed')
-rw-r--r-- | contrib/groff/tmac/strip.sed | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/groff/tmac/strip.sed b/contrib/groff/tmac/strip.sed index b309e86..069c3db 100644 --- a/contrib/groff/tmac/strip.sed +++ b/contrib/groff/tmac/strip.sed @@ -1,2 +1,10 @@ -/%beginstrip%/,$s/[ ]*\\".*// +# strip comments, spaces, etc. after a line containing `%beginstrip%' +/%beginstrip%/,$ { + s/^\.[ ]*/./ + s/^\.\\".*/./ + s/\\".*/\\"/ + /\(.[ad]s\)/!s/[ ]*\\"// + /\(.[ad]s\)/s/\([^ ]*\)\\"/\1/ + s/\([^/]\)doc-/\1/g +} /^\.$/d |