| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WWW::Crawl4AI::Markdown; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: markdown field resolution across Crawl4AI response shapes |
|
3
|
4
|
|
|
4
|
|
24
|
use strict; |
|
|
4
|
|
|
|
|
18
|
|
|
|
4
|
|
|
|
|
142
|
|
|
4
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
|
4
|
|
|
|
|
5
|
|
|
|
4
|
|
|
|
|
265
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
55
|
use Exporter qw( import ); |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
604
|
|
|
10
|
|
|
|
|
|
|
our @EXPORT_OK = qw( resolve_markdown_chain ); |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub resolve_markdown_chain { |
|
14
|
3
|
|
|
3
|
1
|
6
|
my ( $md ) = @_; |
|
15
|
3
|
100
|
|
|
|
15
|
return $md unless ref $md eq 'HASH'; |
|
16
|
2
|
|
|
|
|
4
|
for my $key (qw( fit_markdown raw_markdown markdown_with_citations markdown )) { |
|
17
|
4
|
|
|
|
|
7
|
my $value = $md->{$key}; |
|
18
|
4
|
100
|
66
|
|
|
40
|
return $value if defined $value && length $value; |
|
19
|
|
|
|
|
|
|
} |
|
20
|
0
|
|
|
|
|
|
return undef; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |