File Coverage

blib/lib/DTL/Fast/Filter/Linebreaksbr.pm
Criterion Covered Total %
statement 19 19 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 24 25 96.0


line stmt bran cond sub pod time code
1             package DTL::Fast::Filter::Linebreaksbr;
2 2     2   829 use strict; use utf8; use warnings FATAL => 'all';
  2     2   4  
  2     2   43  
  2         6  
  2         2  
  2         7  
  2         34  
  2         2  
  2         62  
3 2     2   6 use parent 'DTL::Fast::Filter';
  2         1  
  2         9  
4              
5             $DTL::Fast::FILTER_HANDLERS{'linebreaksbr'} = __PACKAGE__;
6              
7             #@Override
8             sub filter
9             {
10 1     1 0 1 shift; # self
11 1         1 my $filter_manager = shift; # filter_manager
12 1         1 my $value = shift; # value
13 1         1 shift; # context
14              
15 1         1 $filter_manager->{'safe'} = 1;
16 1         5 $value =~ s/\n/
\n/gsi;
17            
18 1         2 return $value;
19             }
20              
21             1;