| 1 | package Silki::HTML::FormatText; | ||||||||||
| 2 | { | ||||||||||
| 3 | 3 | $Silki::HTML::FormatText::VERSION = '0.29'; | |||||||||
| 4 | } | ||||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 3 | ▶ | use base 'HTML::FormatText'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | # If these subs don't return true, the formatter won't recurse into the node | ||||||||||
| 12 | # for text/etc. | ||||||||||
| 13 | |||||||||||
| 14 | 2 | ▶ | sub a_start { | ||||||||
|
Subroutine
a_start: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 15 | 2 | my $self = shift; | |||||||||
| 16 | 2 | my $node = shift; | |||||||||
| 17 | |||||||||||
| 18 | 2 | $self->{uri_for_a} = $node->attr('href'); | |||||||||
| 19 | |||||||||||
| 20 | 2 | return 1; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 2 | ▶ | sub a_end { | ||||||||
|
Subroutine
a_end: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 24 | 2 | my $self = shift; | |||||||||
| 25 | 2 | my $node = shift; | |||||||||
| 26 | |||||||||||
| 27 | $self->out( ' (' . $self->{uri_for_a} . ')' ) | ||||||||||
| 28 | 2 | ▶ | if $self->{uri_for_a}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | |||||||||||
| 30 | 2 | delete $self->{uri_for_a}; | |||||||||
| 31 | |||||||||||
| 32 | 2 | return 1; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 3 | 1; | |||||||||
| 36 | |||||||||||
| 37 | # ABSTRACT: A subclass of HTML::FormatText that also handles links | ||||||||||
| 38 | |||||||||||
| 39 | |||||||||||
| 40 | __END__ | ||||||||||