summaryrefslogtreecommitdiff
path: root/libexec/makewhatis
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2001-03-14 10:58:06 +0000
committerMarc Espie <espie@cvs.openbsd.org>2001-03-14 10:58:06 +0000
commitfd886abb92dc46b8c0a1c7ac8a3333ee49cfb77d (patch)
tree72bc3346436d38092062d7c33bafeeea6fbbbb31 /libexec/makewhatis
parent86cd5260e463c020c77de4f8cda6e1fc91830d91 (diff)
ad-hoc code to deal with troff hyphenation in preformatted pages.
Diffstat (limited to 'libexec/makewhatis')
-rw-r--r--libexec/makewhatis/makewhatis.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/makewhatis/makewhatis.pl b/libexec/makewhatis/makewhatis.pl
index c3a6d2843c2..1852f5569b3 100644
--- a/libexec/makewhatis/makewhatis.pl
+++ b/libexec/makewhatis/makewhatis.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# ex:ts=8 sw=4:
-# $OpenBSD: makewhatis.pl,v 1.17 2001/03/14 10:57:13 espie Exp $
+# $OpenBSD: makewhatis.pl,v 1.18 2001/03/14 10:58:05 espie Exp $
#
# Copyright (c) 2000 Marc Espie.
#
@@ -421,6 +421,11 @@ sub handle_formated
if defined $subject;
last;
} else {
+ # deal with troff hyphenations
+ if (defined $subject and $subject =~ m/\xad\s*$/) {
+ $subject =~ s/(?:\xad\cH)*\xad\s*$//;
+ s/^\s*//;
+ }
$subject.=$_;
}
}