Ticket #549: cowens.patch
| File cowens.patch, 1.1 KB (added by azawawi, 4 years ago) |
|---|
-
Pod2HTML.pm
old new 47 47 $self->{html} = ''; 48 48 $self->parse_string_document($input); 49 49 50 #FIXME: this takes care of a bug in Pod::Simple::XHTML 51 $self->{html} =~ s/<</<</g; 52 $self->{html} =~ s/< /< /g; 53 $self->{html} =~ s/<=/<=/g; 54 55 #FIXME: this is incredibly bad, but the anchors are predictible 56 $self->{html} =~ s#<a href=".*?">|</a>##g; 57 50 58 return $self->{html}; 51 59 } 52 60 … … 56 64 # Prevent binding to STDOUT 57 65 sub new { 58 66 my $class = shift; 59 my $self = $class->SUPER::new( output_fh => 1, @_);67 my $self = $class->SUPER::new(@_); 60 68 61 69 # Ignore POD irregularities 62 70 $self->no_whining(1); 63 71 $self->no_errata_section(1); 72 $self->output_string(\$self->{html}); 64 73 65 74 return $self; 66 75 } 67 76 68 # Override emit to build html from scratch :)69 sub emit {70 my $self = shift;71 $self->{html} .= $self->{scratch};72 }73 74 77 ##################################################################### 75 78 # Customize HTML generation 76 79
