diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-28 02:28:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-28 02:28:10 +0000 |
commit | 6ce9a2f89f371acff052cd6a90c56819d51326c2 (patch) | |
tree | 49bd266dbfc75c6531d319a61d455b0bab9edf88 /lib/Pod/Text | |
parent | e9dff0bc79eabe1601bc3ca7b214cfe7333123e5 (diff) | |
download | perl-6ce9a2f89f371acff052cd6a90c56819d51326c2.tar.gz |
Upgrade to podlators 1.20.
p4raw-id: //depot/perl@14459
Diffstat (limited to 'lib/Pod/Text')
-rw-r--r-- | lib/Pod/Text/Overstrike.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Pod/Text/Overstrike.pm b/lib/Pod/Text/Overstrike.pm index 7e23c0d174..bd4c379820 100644 --- a/lib/Pod/Text/Overstrike.pm +++ b/lib/Pod/Text/Overstrike.pm @@ -1,5 +1,5 @@ # Pod::Text::Overstrike -- Convert POD data to formatted overstrike text -# $Id: Overstrike.pm,v 1.6 2001/11/28 01:16:54 eagle Exp $ +# $Id: Overstrike.pm,v 1.7 2002/01/28 01:55:42 eagle Exp $ # # Created by Joe Smith <Joe.Smith@inwap.com> 30-Nov-2000 # (based on Pod::Text::Color by Russ Allbery <rra@stanford.edu>) @@ -36,7 +36,7 @@ use vars qw(@ISA $VERSION); # Don't use the CVS revision as the version, since this module is also in Perl # core and too many things could munge CVS magic revision strings. This # number should ideally be the same as the CVS revision in podlators, however. -$VERSION = 1.06; +$VERSION = 1.07; ############################################################################## @@ -109,8 +109,8 @@ sub wrap { my $spaces = ' ' x $$self{MARGIN}; my $width = $$self{width} - $$self{MARGIN}; while (length > $width) { - if (s/^((?:(?:[^\n]\cH)?[^\n]){0,$width})(\Z|\s+)// - || s/^((?:(?:[^\n]\cH)?[^\n]){$width})//) { + if (s/^((?:(?:[^\n][\b])?[^\n]){0,$width})(\Z|\s+)// + || s/^((?:(?:[^\n][\b])?[^\n]){$width})//) { $output .= $spaces . $1 . "\n"; } else { last; @@ -129,8 +129,8 @@ sub wrap { # version. sub strip_format { my ($self, $text) = @_; - $text =~ s/(.)\cH\1/$1/g; - $text =~ s/_\cH//g; + $text =~ s/(.)[\b]\1/$1/g; + $text =~ s/_[\b]//g; return $text; } |