line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Markup::Markdown; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
29742
|
use 5.8.1; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
31
|
|
6
|
1
|
|
|
1
|
|
8
|
use File::BOM qw(open_bom); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
7
|
1
|
|
|
1
|
|
6
|
use Text::Markdown (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
218
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.25'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub parser { |
12
|
2
|
|
|
2
|
0
|
9
|
my ($file, $encoding, $opts) = @_; |
13
|
2
|
50
|
|
|
|
4
|
my $md = Text::Markdown->new(@{ $opts || [] }); |
|
2
|
|
|
|
|
19
|
|
14
|
2
|
|
|
|
|
47
|
open_bom my $fh, $file, ":encoding($encoding)"; |
15
|
2
|
|
|
|
|
1712
|
local $/; |
16
|
2
|
|
|
|
|
76
|
my $html = $md->markdown(<$fh>); |
17
|
2
|
100
|
|
|
|
32606
|
return unless $html =~ /\S/; |
18
|
1
|
|
|
|
|
5
|
utf8::encode($html); |
19
|
1
|
50
|
|
|
|
4
|
return $html if $opts->{raw}; |
20
|
1
|
|
|
|
|
45
|
return qq{ |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$html |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
__END__ |