/usr/share/perl5/Text/Trac/Heading.pm is in libtext-trac-perl 0.18-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | package Text::Trac::Heading;
use strict;
use warnings;
use base qw(Text::Trac::BlockNode);
our $VERSION = '0.18';
sub init {
my $self = shift;
$self->pattern(qr/^(=+) \s (.*) \s (=+)$/xms);
}
sub parse {
my ( $self, $l ) = @_;
my $c = $self->context;
$l =~ $self->pattern or return;
my $level = length($1) + $c->min_heading_level - 1;
my $id = $self->_strip($2);
$l = qq(<h$level id="$id">) . $self->replace($2) . qq(</h$level>);
$c->htmllines($l);
}
sub _strip {
my ( $self, $word ) = @_;
$word =~ s/[\s,_`'{}!]//g;
return $word;
}
1;
|