| 1 | package MKDoc::Text::Structured::BQ; | ||||||||||||
| 2 | 20 | ▶ | use base qw /MKDoc::Text::Structured::Base/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 20 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 20 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | sub new | ||||||||||||
| 7 | 261 | ▶ | { | ||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||
| 8 | 261 | my $class = shift; | |||||||||||
| 9 | 261 | my $line = shift; | |||||||||||
| 10 | |||||||||||||
| 11 | 261 | my ($marker, $space) = $line =~ /^(\>)(\s*)/; | |||||||||||
| 12 | 261 | ▶ | return unless ($marker); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 13 | |||||||||||||
| 14 | 3 | my $self = $class->SUPER::new(); | |||||||||||
| 15 | 3 | ▶ | $self->{space} = $space || ''; | ||||||||||
|
Condition50%1/2
$space || ''
MC/DC0%0/1
$space || ''
$space
Truth table50%1/2
A
A= $space
| |||||||||||||
| 16 | 3 | return $self; | |||||||||||
| 17 | } | ||||||||||||
| 18 | |||||||||||||
| 19 | |||||||||||||
| 20 | sub is_ok | ||||||||||||
| 21 | 13 | ▶ | { | ||||||||||
|
Subroutine
is_ok: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 22 | 13 | my $self = shift; | |||||||||||
| 23 | 13 | my $line = shift; | |||||||||||
| 24 | 13 | ▶ | $line =~ /^\s*$/ and return 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 25 | 9 | return $line =~ /^\>/; | |||||||||||
| 26 | } | ||||||||||||
| 27 | |||||||||||||
| 28 | |||||||||||||
| 29 | sub process | ||||||||||||
| 30 | 3 | ▶ | { | ||||||||||
|
Subroutine
process: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 31 | 3 | my $self = shift; | |||||||||||
| 32 | 3 | my @lines = @{$self->{lines}}; | |||||||||||
| 33 | 3 | my $space = $self->{space}; | |||||||||||
| 34 | my $text = join "\n", map { | ||||||||||||
| 35 | 3 | s/^\>//; | |||||||||||
| 36 | 10 | s/^$space//; | |||||||||||
| 37 | 10 | $_; | |||||||||||
| 38 | } @lines; | ||||||||||||
| 39 | |||||||||||||
| 40 | 3 | $text = MKDoc::Text::Structured::process ($text); | |||||||||||
| 41 | 3 | return "<blockquote>$text</blockquote>"; | |||||||||||
| 42 | } | ||||||||||||
| 43 | |||||||||||||
| 44 | |||||||||||||
| 45 | |||||||||||||
| 46 | |||||||||||||
| 47 | 20 | 1; | |||||||||||
| 48 | |||||||||||||
| 49 | |||||||||||||
| 50 | __END__ | ||||||||||||