line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
1306
|
use 5.008; # utf8 |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
108
|
|
2
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
94
|
|
3
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
81
|
|
4
|
3
|
|
|
3
|
|
959
|
use utf8; |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
18
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package CPAN::Changes::Markdown::Filter::Rule::VersionsToCode; |
7
|
|
|
|
|
|
|
$CPAN::Changes::Markdown::Filter::Rule::VersionsToCode::VERSION = '1.000000'; |
8
|
|
|
|
|
|
|
# ABSTRACT: Quote things that look like numbers as code entries. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
1170
|
use Moo qw( with ); |
|
3
|
|
|
|
|
17248
|
|
|
3
|
|
|
|
|
19
|
|
13
|
3
|
|
|
3
|
|
3364
|
use CPAN::Changes::Markdown::Filter::NodeUtil qw( mk_node_plaintext mk_node_delimitedtext ); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
26
|
|
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
|
14
|
|
|
14
|
|
41
|
my ( $self, $out, $before, $code, $after ) = @_; |
40
|
14
|
|
|
|
|
15
|
push @{$out}, mk_node_plaintext($before); |
|
14
|
|
|
|
|
41
|
|
41
|
14
|
|
|
|
|
261
|
push @{$out}, mk_node_delimitedtext( q{`}, $code, q{`} ); |
|
14
|
|
|
|
|
43
|
|
42
|
14
|
|
|
|
|
1373
|
push @{$out}, $self->filter_plaintext( mk_node_plaintext($after) ); |
|
14
|
|
|
|
|
40
|
|
43
|
14
|
|
|
|
|
22
|
return @{$out}; |
|
14
|
|
|
|
|
69
|
|
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# _Pulp__5010_qr_m_propagate_properly |
47
|
|
|
|
|
|
|
## no critic (Compatibility::PerlMinimumVersionAndWhy) |
48
|
|
|
|
|
|
|
my $re_version = qr/(\A|\A.*?\s) ( v? [\d._]+ (?:-TRIAL)? ) (\z|\s.*\z)/msx; |
49
|
|
|
|
|
|
|
my $re_number = qr/ \d /msx; |
50
|
|
|
|
|
|
|
## use critic |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub filter_plaintext { |
57
|
34
|
|
|
34
|
1
|
289
|
my ( $self, $input ) = @_; |
58
|
34
|
100
|
|
|
|
160
|
if ( $input->content !~ $re_number ) { |
59
|
20
|
|
|
|
|
48
|
return $input; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
14
|
50
|
|
|
|
111
|
if ( $input->content =~ $re_version ) { |
63
|
14
|
|
|
|
|
41
|
return $self->_inject_code_delim( [], $1, $2, $3 ); |
64
|
|
|
|
|
|
|
} |
65
|
0
|
|
|
|
|
|
return $input; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |