| 1 | package Text::Livedoor::Wiki::Plugin::Inline::Footnote; | ||||||||||||
| 2 | |||||||||||||
| 3 | 10 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 10 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 10 | ▶ | use base qw(Text::Livedoor::Wiki::Plugin::Inline); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 10 | __PACKAGE__->regex(q{\(\(((?:(?<!\)\)).)*)\)\)}); | |||||||||||
| 8 | 10 | __PACKAGE__->n_args(1); | |||||||||||
| 9 | |||||||||||||
| 10 | 6 | ▶ | sub process { | ||||||||||
|
Subroutine
process: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 11 | 6 | my ( $class , $inline , $line ) = @_; | |||||||||||
| 12 | 6 | $line = $inline->parse($line); | |||||||||||
| 13 | 6 | my $scratchpad = $Text::Livedoor::Wiki::scratchpad ; | |||||||||||
| 14 | 6 | ▶ | $scratchpad->{footnotes} ||= []; | ||||||||||
|
Condition100%2/2
$scratchpad->{"footnotes"} ||= []
MC/DC100%1/1
$scratchpad->{"footnotes"} ||= []
$scratchpad->{"footnotes"}
Truth table100%2/2
A
A= $scratchpad->{"footnotes"}
| |||||||||||||
| 15 | 6 | push @{$scratchpad->{footnotes}},$line; | |||||||||||
| 16 | 6 | my $cnt = scalar @{$scratchpad->{footnotes}}; | |||||||||||
| 17 | 6 | return qq|<a href="#footer-footnote$cnt" name="footnote$cnt">*$cnt</a>|; | |||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | 10 | 1; | |||||||||||
| 21 | |||||||||||||
| 22 | =head1 NAME | ||||||||||||
| 23 | |||||||||||||
| 24 | Text::Livedoor::Wiki::Plugin::Inline::Footnote Footnote Inline Plugin | ||||||||||||
| 25 | |||||||||||||
| 26 | =head1 DESCRIPTION | ||||||||||||
| 27 | |||||||||||||
| 28 | This plugin is implement with really bad manner. Anyway, with this plugin , you can use footnote. | ||||||||||||
| 29 | |||||||||||||
| 30 | =head1 SYNOPSIS | ||||||||||||
| 31 | |||||||||||||
| 32 | ((polocky is a charactor for livedoor wiki))polocky is... | ||||||||||||
| 33 | |||||||||||||
| 34 | =head1 FUNCTION | ||||||||||||
| 35 | |||||||||||||
| 36 | =head2 process | ||||||||||||
| 37 | |||||||||||||
| 38 | =head1 AUTHOR | ||||||||||||
| 39 | |||||||||||||
| 40 | polocky | ||||||||||||
| 41 | |||||||||||||
| 42 | =cut | ||||||||||||