| 1 | package Markdent::Regexes; | ||
| 2 | |||
| 3 | 35 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 35 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 35 | our $VERSION = '0.39'; | |
| 7 | |||
| 8 | 35 | ▶ | use List::AllUtils qw( uniq ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 35 | ▶ | use base 'Exporter'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 35 | our %EXPORT_TAGS = ( | |
| 13 | block => [ | ||
| 14 | qw( | ||
| 15 | $HorizontalWS | ||
| 16 | $EmptyLine | ||
| 17 | $EmptyLines | ||
| 18 | $BlockStart | ||
| 19 | $BlockEnd | ||
| 20 | ), | ||
| 21 | ], | ||
| 22 | span => [], | ||
| 23 | other => [qw( $HTMLComment )], | ||
| 24 | ); | ||
| 25 | |||
| 26 | 35 | our @EXPORT_OK = uniq( map { @{$_} } values %EXPORT_TAGS ); | |
| 27 | |||
| 28 | ## no critic (Variables::ProhibitPackageVars) | ||
| 29 | 35 | our $HorizontalWS = qr/(?: \p{SpaceSeparator} | \t )/x; | |
| 30 | 35 | our $EmptyLine = qr/(?: ^ $HorizontalWS* \n ) /xm; | |
| 31 | 35 | our $EmptyLines = qr/ (?: $EmptyLine )+ /xm; | |
| 32 | |||
| 33 | 35 | our $BlockStart = qr/(?: \A | $EmptyLines )/xm; | |
| 34 | 35 | our $BlockEnd = qr/(?=(?: $EmptyLines | \z ) )/xm; | |
| 35 | |||
| 36 | 35 | our $HTMLComment = qr{<!--(.+?)-->}s; | |
| 37 | ## use critic | ||
| 38 | |||
| 39 | 35 | 1; | |