line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Markdent::Role::BlockParser; |
2
|
|
|
|
|
|
|
|
3
|
34
|
|
|
34
|
|
21483
|
use strict; |
|
34
|
|
|
|
|
102
|
|
|
34
|
|
|
|
|
1136
|
|
4
|
34
|
|
|
34
|
|
222
|
use warnings; |
|
34
|
|
|
|
|
94
|
|
|
34
|
|
|
|
|
1045
|
|
5
|
34
|
|
|
34
|
|
244
|
use namespace::autoclean; |
|
34
|
|
|
|
|
84
|
|
|
34
|
|
|
|
|
260
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.38'; |
8
|
|
|
|
|
|
|
|
9
|
34
|
|
|
34
|
|
3157
|
use Specio::Declare; |
|
34
|
|
|
|
|
93
|
|
|
34
|
|
|
|
|
390
|
|
10
|
|
|
|
|
|
|
|
11
|
34
|
|
|
34
|
|
7425
|
use Moose::Role; |
|
34
|
|
|
|
|
94
|
|
|
34
|
|
|
|
|
343
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with 'Markdent::Role::AnyParser'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
requires 'parse_document'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has _span_parser => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
does => object_does_type('Markdent::Role::SpanParser'), |
20
|
|
|
|
|
|
|
init_arg => 'span_parser', |
21
|
|
|
|
|
|
|
required => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# ABSTRACT: A role for block parsers |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=encoding UTF-8 |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Markdent::Role::BlockParser - A role for block parsers |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 VERSION |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
version 0.38 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 DESCRIPTION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This role implements behavior shared by all block parsers. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 REQUIRED METHODS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=over 4 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item * $parse->parse_document(\$text) |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This method takes a scalar reference to a markdown document and parses it for |
53
|
|
|
|
|
|
|
block-level markup. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=back |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This roles provides the following attributes: |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 _span_parser |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is a read-only attribute. It is an object which does the |
64
|
|
|
|
|
|
|
L<Markdent::Role::SpanParser> role. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This is required for all block parsers. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 ROLES |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This role does the L<Markdent::Role::AnyParser> and |
71
|
|
|
|
|
|
|
L<Markdent::Role::DebugPrinter> roles. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 BUGS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
See L<Markdent> for bug reporting details. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/Markdent/issues>. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
I am also usually active on IRC as 'autarch' on C<irc://irc.perl.org>. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 SOURCE |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The source code repository for Markdent can be found at L<https://github.com/houseabsolute/Markdent>. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Dave Rolsky. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
94
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
The full text of the license can be found in the |
97
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |