| 1 | package Text::HTML::Turndown::Strikethrough 0.12; | ||
| 2 | 1 | ▶ | use 5.020; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use experimental 'signatures'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use stable 'postderef'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use List::MoreUtils 'all'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | our %RULES = ( | ||
| 8 | strikethrough => { | ||
| 9 | |||
| 10 | filter => ['del', 's', 'strike'], | ||
| 11 | 3 | ▶ | replacement => sub( $content, $node, $options, $context ) { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 12 | 3 | return '~~' . $content . '~~' | |
| 13 | } | ||
| 14 | } | ||
| 15 | 1 | ); | |
| 16 | |||
| 17 | 22 | ▶ | sub install ($class, $target) { |
|
Subroutine
install: called CC=2 SCAR=6.9
Pod
undocumented
| |||
| 18 | 22 | for my $key (keys %RULES) { | |
| 19 | 22 | $target->addRule($key, $RULES{$key}) | |
| 20 | } | ||
| 21 | } | ||
| 22 | |||
| 23 | 1 | 1; | |