Pod-Elemental-Transformer-SynHi
view release on metacpan or search on metacpan
lib/Pod/Elemental/Transformer/SynHi.pm view on Meta::CPAN
#pod
#pod Some other minor changes are made, and these may change over time, to make the
#pod code blocks "better" displayed. If your needs are very specific, replace this
#pod method.
#pod
#pod =cut
sub standard_code_block {
my ($self, $html) = @_;
my @lines = split m{<br(?:\s*/)>|\n}, $html;
# The leading nbsp below, in generating $code, is to try to get indentation
# to appear in feed readers, which to not respect white-space:pre or the pre
# element. The use of <br> instead of newlines is for the same reason.
# -- rjbs, 2009-12-10
my $nums = join "<br />", map {; "$_: " } (1 .. @lines);
my $code = join "<br />",
map {; s/^(\s+)/' ' x length $1/me; $_ }
@lines;
( run in 0.738 second using v1.01-cache-2.11-cpan-71847e10f99 )