line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
1201
|
use 5.008; # utf8 |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
71
|
|
2
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
61
|
|
3
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
932
|
use utf8; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
13
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package CPAN::Changes::Markdown::Filter::Rule::NumericsToCode; |
7
|
|
|
|
|
|
|
$CPAN::Changes::Markdown::Filter::Rule::NumericsToCode::VERSION = '1.000000'; |
8
|
|
|
|
|
|
|
# ABSTRACT: Quote things that look like numbers as code entries. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
1033
|
use Moo qw( with has ); |
|
2
|
|
|
|
|
17299
|
|
|
2
|
|
|
|
|
15
|
|
13
|
2
|
|
|
2
|
|
2863
|
use CPAN::Changes::Markdown::Filter::NodeUtil qw( mk_node_plaintext mk_node_delimitedtext ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
18
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
with 'CPAN::Changes::Markdown::Role::Filter::Rule::PlainText'; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _inject_code_delim { |
39
|
2
|
|
|
2
|
|
12
|
my ( $self, $out, $before, $code, $after ) = @_; |
40
|
2
|
|
|
|
|
5
|
push @{$out}, mk_node_plaintext($before); |
|
2
|
|
|
|
|
10
|
|
41
|
2
|
|
|
|
|
64
|
push @{$out}, mk_node_delimitedtext( q{`}, $code, q{`} ); |
|
2
|
|
|
|
|
12
|
|
42
|
2
|
|
|
|
|
1773
|
push @{$out}, $self->filter_plaintext( mk_node_plaintext($after) ); |
|
2
|
|
|
|
|
10
|
|
43
|
2
|
|
|
|
|
4
|
return @{$out}; |
|
2
|
|
|
|
|
15
|
|
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# _Pulp__5010_qr_m_propagate_properly |
47
|
|
|
|
|
|
|
## no critic (Compatibility::PerlMinimumVersionAndWhy) |
48
|
|
|
|
|
|
|
my $re_contains_number = qr/ \d /msx; |
49
|
|
|
|
|
|
|
my $re_numeric = qr/ (\A|\A.*?\s) ( [\d._]+ ) (\z|\s.*\z)/msx; |
50
|
|
|
|
|
|
|
## use critic |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub filter_plaintext { |
57
|
8
|
|
|
8
|
1
|
64
|
my ( $self, $input ) = @_; |
58
|
8
|
100
|
|
|
|
79
|
if ( $input->content !~ $re_contains_number ) { |
59
|
3
|
|
|
|
|
10
|
return $input; |
60
|
|
|
|
|
|
|
} |
61
|
5
|
100
|
|
|
|
89
|
if ( $input->content =~ $re_numeric ) { |
62
|
2
|
|
|
|
|
13
|
return $self->_inject_code_delim( [], $1, $2, $3 ); |
63
|
|
|
|
|
|
|
} |
64
|
3
|
|
|
|
|
17
|
return $input; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__END__ |