On Thu, 03 Dec 2009 00:28:16 -0500, "rra@stanford.edu via RT" <bug-podlators@rt.cpan.org> wrote:
Show quoted text> Your attached patch didn't include the Pod::Text::Overstrike
> modification to override strip_format. Could you send that?
Pod::Text::Overstrike already defines a strip_format function, which
doesn't need any modification, so the only change necessary is the
patch to Pod::Text.
To fix Pod::Text::Color, a strip_format function does need to be added.
Something like the following should work:
--- /usr/lib/perl5/5.10.0/Pod/Text/Color.pm.orig 2009-12-03 09:21:14.000000000 -0800
+++ /usr/lib/perl5/5.10.0/Pod/Text/Color.pm 2009-12-03 09:21:52.000000000 -0800
@@ -54,6 +54,12 @@
sub cmd_f { return colored ($_[2], 'cyan') }
sub cmd_i { return colored ($_[2], 'yellow') }
+sub strip_format {
+ my ($self, $text) = @_;
+ $text =~ s/\e\[[\d;]*m//g;
+ return $text;
+}
+
# Output any included code in green.
sub output_code {
my ($self, $code) = @_;
--
David Hull