summaryrefslogtreecommitdiff
path: root/tmac/strip.sed
diff options
context:
space:
mode:
Diffstat (limited to 'tmac/strip.sed')
-rw-r--r--tmac/strip.sed11
1 files changed, 9 insertions, 2 deletions
diff --git a/tmac/strip.sed b/tmac/strip.sed
index 3dac41e5..6133411d 100644
--- a/tmac/strip.sed
+++ b/tmac/strip.sed
@@ -1,3 +1,10 @@
-# strip all troff comments after a line containing `%beginstrip%
-/%beginstrip%/,$s/[ ]*\\".*//
+# strip comments, spaces, etc. after a line containing `%beginstrip%'
+/%beginstrip%/,$ {
+ s/^\.[ ]*/./
+ s/^\.\\".*/./
+ s/\\".*/\\"/
+ /\(.ds\)\|\(.as\)/!s/[ ]*\\"//
+ /\(.ds\)\|\(.as\)/s/\([^ ]\)\\"/\1/
+ s/\([^/]\)doc-/\1/g
+}
/^\.$/d