line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Simple::HTML; |
2
|
2
|
|
|
2
|
|
140578
|
use strict; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
61
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
59
|
|
4
|
2
|
|
|
2
|
|
11
|
use base qw(Syntax::Highlight::Engine::Simple); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1247
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.051'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
### ---------------------------------------------------------------------------- |
8
|
|
|
|
|
|
|
### set syntax |
9
|
|
|
|
|
|
|
### ---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
sub setSyntax { |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
shift->{syntax} = |
13
|
|
|
|
|
|
|
[ |
14
|
|
|
|
|
|
|
{ |
15
|
1
|
|
|
1
|
1
|
144
|
class => 'tag', |
16
|
|
|
|
|
|
|
regexp => q!(?s)(?<=<).+?(?=>)!, |
17
|
|
|
|
|
|
|
}, |
18
|
|
|
|
|
|
|
{ |
19
|
|
|
|
|
|
|
class => 'quote', |
20
|
|
|
|
|
|
|
regexp => q!(?s)'.*?'!, |
21
|
|
|
|
|
|
|
container => 'tag', |
22
|
|
|
|
|
|
|
}, |
23
|
|
|
|
|
|
|
{ |
24
|
|
|
|
|
|
|
class => 'wquote', |
25
|
|
|
|
|
|
|
regexp => q!(?s)".*?"!, |
26
|
|
|
|
|
|
|
container => 'tag', |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
class => 'number', |
30
|
|
|
|
|
|
|
regexp => '\b\d+\b', |
31
|
|
|
|
|
|
|
container => 'tag', |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
class => 'comment', |
35
|
|
|
|
|
|
|
regexp => '(?s)', |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
{ |
38
|
|
|
|
|
|
|
class => 'url', |
39
|
|
|
|
|
|
|
regexp => q!s?https?://[-_.\!~*'()a-zA-Z0-9;/?:@&=+$,%#]+!, |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
]; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
return 1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |