| 1 | # Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. | ||||||||||||||||||||
| 2 | # This program is free software; you can redistribute it and/or | ||||||||||||||||||||
| 3 | # modify it under the same terms as Perl itself. | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | # This file was generated from the 'html.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.98 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #kate author Wilbert Berendsen (wilbert@kde.nl) | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:05 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::HTML; | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | our $VERSION = '0.14'; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 1 | ▶ | use base('Syntax::Highlight::Engine::Kate::Template'); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | sub new { | ||||||||||||||||||||
| 22 | 3 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 23 | 3 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 24 | 3 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 25 | 3 | $self->attributes({ | |||||||||||||||||||
| 26 | 'Attribute' => 'Others', | ||||||||||||||||||||
| 27 | 'CDATA' => 'BaseN', | ||||||||||||||||||||
| 28 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 29 | 'Doctype' => 'DataType', | ||||||||||||||||||||
| 30 | 'Element' => 'Keyword', | ||||||||||||||||||||
| 31 | 'EntityRef' => 'DecVal', | ||||||||||||||||||||
| 32 | 'Error' => 'Error', | ||||||||||||||||||||
| 33 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 34 | 'PEntityRef' => 'DecVal', | ||||||||||||||||||||
| 35 | 'Processing Instruction' => 'Keyword', | ||||||||||||||||||||
| 36 | 'Value' => 'String', | ||||||||||||||||||||
| 37 | }); | ||||||||||||||||||||
| 38 | 3 | $self->contextdata({ | |||||||||||||||||||
| 39 | 'CDATA' => { | ||||||||||||||||||||
| 40 | callback => \&parseCDATA, | ||||||||||||||||||||
| 41 | attribute => 'Normal Text', | ||||||||||||||||||||
| 42 | }, | ||||||||||||||||||||
| 43 | 'CSS' => { | ||||||||||||||||||||
| 44 | callback => \&parseCSS, | ||||||||||||||||||||
| 45 | attribute => 'Normal Text', | ||||||||||||||||||||
| 46 | }, | ||||||||||||||||||||
| 47 | 'CSS content' => { | ||||||||||||||||||||
| 48 | callback => \&parseCSScontent, | ||||||||||||||||||||
| 49 | attribute => 'Normal Text', | ||||||||||||||||||||
| 50 | }, | ||||||||||||||||||||
| 51 | 'Comment' => { | ||||||||||||||||||||
| 52 | callback => \&parseComment, | ||||||||||||||||||||
| 53 | attribute => 'Comment', | ||||||||||||||||||||
| 54 | }, | ||||||||||||||||||||
| 55 | 'Doctype' => { | ||||||||||||||||||||
| 56 | callback => \&parseDoctype, | ||||||||||||||||||||
| 57 | attribute => 'Normal Text', | ||||||||||||||||||||
| 58 | }, | ||||||||||||||||||||
| 59 | 'Doctype Internal Subset' => { | ||||||||||||||||||||
| 60 | callback => \&parseDoctypeInternalSubset, | ||||||||||||||||||||
| 61 | attribute => 'Normal Text', | ||||||||||||||||||||
| 62 | }, | ||||||||||||||||||||
| 63 | 'Doctype Markupdecl' => { | ||||||||||||||||||||
| 64 | callback => \&parseDoctypeMarkupdecl, | ||||||||||||||||||||
| 65 | attribute => 'Normal Text', | ||||||||||||||||||||
| 66 | }, | ||||||||||||||||||||
| 67 | 'Doctype Markupdecl DQ' => { | ||||||||||||||||||||
| 68 | callback => \&parseDoctypeMarkupdeclDQ, | ||||||||||||||||||||
| 69 | attribute => 'Value', | ||||||||||||||||||||
| 70 | }, | ||||||||||||||||||||
| 71 | 'Doctype Markupdecl SQ' => { | ||||||||||||||||||||
| 72 | callback => \&parseDoctypeMarkupdeclSQ, | ||||||||||||||||||||
| 73 | attribute => 'Value', | ||||||||||||||||||||
| 74 | }, | ||||||||||||||||||||
| 75 | 'El Close' => { | ||||||||||||||||||||
| 76 | callback => \&parseElClose, | ||||||||||||||||||||
| 77 | attribute => 'Normal Text', | ||||||||||||||||||||
| 78 | }, | ||||||||||||||||||||
| 79 | 'El Close 2' => { | ||||||||||||||||||||
| 80 | callback => \&parseElClose2, | ||||||||||||||||||||
| 81 | attribute => 'Normal Text', | ||||||||||||||||||||
| 82 | }, | ||||||||||||||||||||
| 83 | 'El Close 3' => { | ||||||||||||||||||||
| 84 | callback => \&parseElClose3, | ||||||||||||||||||||
| 85 | attribute => 'Normal Text', | ||||||||||||||||||||
| 86 | }, | ||||||||||||||||||||
| 87 | 'El Open' => { | ||||||||||||||||||||
| 88 | callback => \&parseElOpen, | ||||||||||||||||||||
| 89 | attribute => 'Normal Text', | ||||||||||||||||||||
| 90 | }, | ||||||||||||||||||||
| 91 | 'FindAttributes' => { | ||||||||||||||||||||
| 92 | callback => \&parseFindAttributes, | ||||||||||||||||||||
| 93 | attribute => 'Normal Text', | ||||||||||||||||||||
| 94 | }, | ||||||||||||||||||||
| 95 | 'FindDTDRules' => { | ||||||||||||||||||||
| 96 | callback => \&parseFindDTDRules, | ||||||||||||||||||||
| 97 | attribute => 'Normal Text', | ||||||||||||||||||||
| 98 | }, | ||||||||||||||||||||
| 99 | 'FindEntityRefs' => { | ||||||||||||||||||||
| 100 | callback => \&parseFindEntityRefs, | ||||||||||||||||||||
| 101 | attribute => 'Normal Text', | ||||||||||||||||||||
| 102 | }, | ||||||||||||||||||||
| 103 | 'FindHTML' => { | ||||||||||||||||||||
| 104 | callback => \&parseFindHTML, | ||||||||||||||||||||
| 105 | attribute => 'Normal Text', | ||||||||||||||||||||
| 106 | }, | ||||||||||||||||||||
| 107 | 'FindPEntityRefs' => { | ||||||||||||||||||||
| 108 | callback => \&parseFindPEntityRefs, | ||||||||||||||||||||
| 109 | attribute => 'Normal Text', | ||||||||||||||||||||
| 110 | }, | ||||||||||||||||||||
| 111 | 'JS' => { | ||||||||||||||||||||
| 112 | callback => \&parseJS, | ||||||||||||||||||||
| 113 | attribute => 'Normal Text', | ||||||||||||||||||||
| 114 | }, | ||||||||||||||||||||
| 115 | 'JS comment close' => { | ||||||||||||||||||||
| 116 | callback => \&parseJScommentclose, | ||||||||||||||||||||
| 117 | attribute => 'Comment', | ||||||||||||||||||||
| 118 | lineending => '#pop', | ||||||||||||||||||||
| 119 | }, | ||||||||||||||||||||
| 120 | 'JS content' => { | ||||||||||||||||||||
| 121 | callback => \&parseJScontent, | ||||||||||||||||||||
| 122 | attribute => 'Normal Text', | ||||||||||||||||||||
| 123 | }, | ||||||||||||||||||||
| 124 | 'PI' => { | ||||||||||||||||||||
| 125 | callback => \&parsePI, | ||||||||||||||||||||
| 126 | attribute => 'Normal Text', | ||||||||||||||||||||
| 127 | }, | ||||||||||||||||||||
| 128 | 'Start' => { | ||||||||||||||||||||
| 129 | callback => \&parseStart, | ||||||||||||||||||||
| 130 | attribute => 'Normal Text', | ||||||||||||||||||||
| 131 | }, | ||||||||||||||||||||
| 132 | 'Value' => { | ||||||||||||||||||||
| 133 | callback => \&parseValue, | ||||||||||||||||||||
| 134 | attribute => 'Normal Text', | ||||||||||||||||||||
| 135 | fallthrough => 'Value NQ', | ||||||||||||||||||||
| 136 | }, | ||||||||||||||||||||
| 137 | 'Value DQ' => { | ||||||||||||||||||||
| 138 | callback => \&parseValueDQ, | ||||||||||||||||||||
| 139 | attribute => 'Value', | ||||||||||||||||||||
| 140 | }, | ||||||||||||||||||||
| 141 | 'Value NQ' => { | ||||||||||||||||||||
| 142 | callback => \&parseValueNQ, | ||||||||||||||||||||
| 143 | attribute => 'Normal Text', | ||||||||||||||||||||
| 144 | lineending => '#pop#pop', | ||||||||||||||||||||
| 145 | fallthrough => '#pop#pop', | ||||||||||||||||||||
| 146 | }, | ||||||||||||||||||||
| 147 | 'Value SQ' => { | ||||||||||||||||||||
| 148 | callback => \&parseValueSQ, | ||||||||||||||||||||
| 149 | attribute => 'Value', | ||||||||||||||||||||
| 150 | }, | ||||||||||||||||||||
| 151 | }); | ||||||||||||||||||||
| 152 | 3 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 153 | 3 | $self->basecontext('Start'); | |||||||||||||||||||
| 154 | 3 | $self->keywordscase(1); | |||||||||||||||||||
| 155 | 3 | $self->initialize; | |||||||||||||||||||
| 156 | 3 | bless ($self, $class); | |||||||||||||||||||
| 157 | 3 | return $self; | |||||||||||||||||||
| 158 | } | ||||||||||||||||||||
| 159 | |||||||||||||||||||||
| 160 | sub language { | ||||||||||||||||||||
| 161 | 0 | ▶ | return 'HTML'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 162 | } | ||||||||||||||||||||
| 163 | |||||||||||||||||||||
| 164 | sub parseCDATA { | ||||||||||||||||||||
| 165 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCDATA: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 166 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 167 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 168 | 0 | return 1 | |||||||||||||||||||
| 169 | } | ||||||||||||||||||||
| 170 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 171 | 0 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 172 | 0 | return 1 | |||||||||||||||||||
| 173 | } | ||||||||||||||||||||
| 174 | # String => ']]>' | ||||||||||||||||||||
| 175 | # attribute => 'CDATA' | ||||||||||||||||||||
| 176 | # context => '#pop' | ||||||||||||||||||||
| 177 | # endRegion => 'cdata' | ||||||||||||||||||||
| 178 | # type => 'StringDetect' | ||||||||||||||||||||
| 179 | 0 | ▶ | if ($self->testStringDetect($text, ']]>', 0, 0, 0, undef, 0, '#pop', 'CDATA')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 180 | 0 | return 1 | |||||||||||||||||||
| 181 | } | ||||||||||||||||||||
| 182 | # String => ']]>' | ||||||||||||||||||||
| 183 | # attribute => 'EntityRef' | ||||||||||||||||||||
| 184 | # context => '#stay' | ||||||||||||||||||||
| 185 | # type => 'StringDetect' | ||||||||||||||||||||
| 186 | 0 | ▶ | if ($self->testStringDetect($text, ']]>', 0, 0, 0, undef, 0, '#stay', 'EntityRef')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 187 | 0 | return 1 | |||||||||||||||||||
| 188 | } | ||||||||||||||||||||
| 189 | 0 | return 0; | |||||||||||||||||||
| 190 | }; | ||||||||||||||||||||
| 191 | |||||||||||||||||||||
| 192 | sub parseCSS { | ||||||||||||||||||||
| 193 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCSS: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 194 | # attribute => 'Element' | ||||||||||||||||||||
| 195 | # char => '/' | ||||||||||||||||||||
| 196 | # char1 => '>' | ||||||||||||||||||||
| 197 | # context => '#pop' | ||||||||||||||||||||
| 198 | # endRegion => 'style' | ||||||||||||||||||||
| 199 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 200 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 201 | 0 | return 1 | |||||||||||||||||||
| 202 | } | ||||||||||||||||||||
| 203 | # attribute => 'Element' | ||||||||||||||||||||
| 204 | # char => '>' | ||||||||||||||||||||
| 205 | # context => 'CSS content' | ||||||||||||||||||||
| 206 | # type => 'DetectChar' | ||||||||||||||||||||
| 207 | 0 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'CSS content', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 208 | 0 | return 1 | |||||||||||||||||||
| 209 | } | ||||||||||||||||||||
| 210 | # context => 'FindAttributes' | ||||||||||||||||||||
| 211 | # type => 'IncludeRules' | ||||||||||||||||||||
| 212 | 0 | ▶ | if ($self->includeRules('FindAttributes', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 213 | 0 | return 1 | |||||||||||||||||||
| 214 | } | ||||||||||||||||||||
| 215 | # String => '\S' | ||||||||||||||||||||
| 216 | # attribute => 'Error' | ||||||||||||||||||||
| 217 | # context => '#stay' | ||||||||||||||||||||
| 218 | # type => 'RegExpr' | ||||||||||||||||||||
| 219 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 220 | 0 | return 1 | |||||||||||||||||||
| 221 | } | ||||||||||||||||||||
| 222 | 0 | return 0; | |||||||||||||||||||
| 223 | }; | ||||||||||||||||||||
| 224 | |||||||||||||||||||||
| 225 | sub parseCSScontent { | ||||||||||||||||||||
| 226 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCSScontent: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 227 | # String => '</style\b' | ||||||||||||||||||||
| 228 | # attribute => 'Element' | ||||||||||||||||||||
| 229 | # context => 'El Close 2' | ||||||||||||||||||||
| 230 | # endRegion => 'style' | ||||||||||||||||||||
| 231 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 232 | # type => 'RegExpr' | ||||||||||||||||||||
| 233 | 0 | ▶ | if ($self->testRegExpr($text, '</style\\b', 1, 0, 0, undef, 0, 'El Close 2', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 234 | 0 | return 1 | |||||||||||||||||||
| 235 | } | ||||||||||||||||||||
| 236 | # context => '##CSS' | ||||||||||||||||||||
| 237 | # includeAttrib => 'true' | ||||||||||||||||||||
| 238 | # type => 'IncludeRules' | ||||||||||||||||||||
| 239 | 0 | ▶ | if ($self->includePlugin('CSS', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 240 | 0 | return 1 | |||||||||||||||||||
| 241 | } | ||||||||||||||||||||
| 242 | 0 | return 0; | |||||||||||||||||||
| 243 | }; | ||||||||||||||||||||
| 244 | |||||||||||||||||||||
| 245 | sub parseComment { | ||||||||||||||||||||
| 246 | 24 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseComment: called CC=6 SCAR=19.1
Pod
undocumented
| |||||||||||||||||||||
| 247 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 248 | 24 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 249 | 0 | return 1 | |||||||||||||||||||
| 250 | } | ||||||||||||||||||||
| 251 | # context => '##Alerts' | ||||||||||||||||||||
| 252 | # type => 'IncludeRules' | ||||||||||||||||||||
| 253 | 24 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 254 | 0 | return 1 | |||||||||||||||||||
| 255 | } | ||||||||||||||||||||
| 256 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 257 | 24 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 258 | 8 | return 1 | |||||||||||||||||||
| 259 | } | ||||||||||||||||||||
| 260 | # String => '-->' | ||||||||||||||||||||
| 261 | # attribute => 'Comment' | ||||||||||||||||||||
| 262 | # context => '#pop' | ||||||||||||||||||||
| 263 | # endRegion => 'comment' | ||||||||||||||||||||
| 264 | # type => 'StringDetect' | ||||||||||||||||||||
| 265 | 16 | ▶ | if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 266 | 4 | return 1 | |||||||||||||||||||
| 267 | } | ||||||||||||||||||||
| 268 | # String => '-(-(?!->))+' | ||||||||||||||||||||
| 269 | # attribute => 'Error' | ||||||||||||||||||||
| 270 | # context => '#stay' | ||||||||||||||||||||
| 271 | # type => 'RegExpr' | ||||||||||||||||||||
| 272 | 12 | ▶ | if ($self->testRegExpr($text, '-(-(?!->))+', 0, 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 273 | 0 | return 1 | |||||||||||||||||||
| 274 | } | ||||||||||||||||||||
| 275 | 12 | return 0; | |||||||||||||||||||
| 276 | }; | ||||||||||||||||||||
| 277 | |||||||||||||||||||||
| 278 | sub parseDoctype { | ||||||||||||||||||||
| 279 | 198 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseDoctype: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||
| 280 | # attribute => 'Doctype' | ||||||||||||||||||||
| 281 | # char => '>' | ||||||||||||||||||||
| 282 | # context => '#pop' | ||||||||||||||||||||
| 283 | # endRegion => 'doctype' | ||||||||||||||||||||
| 284 | # type => 'DetectChar' | ||||||||||||||||||||
| 285 | 198 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 286 | 2 | return 1 | |||||||||||||||||||
| 287 | } | ||||||||||||||||||||
| 288 | # attribute => 'Doctype' | ||||||||||||||||||||
| 289 | # beginRegion => 'int_subset' | ||||||||||||||||||||
| 290 | # char => '[' | ||||||||||||||||||||
| 291 | # context => 'Doctype Internal Subset' | ||||||||||||||||||||
| 292 | # type => 'DetectChar' | ||||||||||||||||||||
| 293 | 196 | ▶ | if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Doctype Internal Subset', 'Doctype')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 294 | 0 | return 1 | |||||||||||||||||||
| 295 | } | ||||||||||||||||||||
| 296 | 196 | return 0; | |||||||||||||||||||
| 297 | }; | ||||||||||||||||||||
| 298 | |||||||||||||||||||||
| 299 | sub parseDoctypeInternalSubset { | ||||||||||||||||||||
| 300 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseDoctypeInternalSubset: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||
| 301 | # attribute => 'Doctype' | ||||||||||||||||||||
| 302 | # char => ']' | ||||||||||||||||||||
| 303 | # context => '#pop' | ||||||||||||||||||||
| 304 | # endRegion => 'int_subset' | ||||||||||||||||||||
| 305 | # type => 'DetectChar' | ||||||||||||||||||||
| 306 | 0 | ▶ | if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 307 | 0 | return 1 | |||||||||||||||||||
| 308 | } | ||||||||||||||||||||
| 309 | # context => 'FindDTDRules' | ||||||||||||||||||||
| 310 | # type => 'IncludeRules' | ||||||||||||||||||||
| 311 | 0 | ▶ | if ($self->includeRules('FindDTDRules', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 312 | 0 | return 1 | |||||||||||||||||||
| 313 | } | ||||||||||||||||||||
| 314 | # String => '<!--' | ||||||||||||||||||||
| 315 | # attribute => 'Comment' | ||||||||||||||||||||
| 316 | # beginRegion => 'comment' | ||||||||||||||||||||
| 317 | # context => 'Comment' | ||||||||||||||||||||
| 318 | # type => 'StringDetect' | ||||||||||||||||||||
| 319 | 0 | ▶ | if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 320 | 0 | return 1 | |||||||||||||||||||
| 321 | } | ||||||||||||||||||||
| 322 | # String => '<\?[\w:-]*' | ||||||||||||||||||||
| 323 | # attribute => 'Processing Instruction' | ||||||||||||||||||||
| 324 | # beginRegion => 'pi' | ||||||||||||||||||||
| 325 | # context => 'PI' | ||||||||||||||||||||
| 326 | # type => 'RegExpr' | ||||||||||||||||||||
| 327 | 0 | ▶ | if ($self->testRegExpr($text, '<\\?[\\w:-]*', 0, 0, 0, undef, 0, 'PI', 'Processing Instruction')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 328 | 0 | return 1 | |||||||||||||||||||
| 329 | } | ||||||||||||||||||||
| 330 | # context => 'FindPEntityRefs' | ||||||||||||||||||||
| 331 | # type => 'IncludeRules' | ||||||||||||||||||||
| 332 | 0 | ▶ | if ($self->includeRules('FindPEntityRefs', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 333 | 0 | return 1 | |||||||||||||||||||
| 334 | } | ||||||||||||||||||||
| 335 | 0 | return 0; | |||||||||||||||||||
| 336 | }; | ||||||||||||||||||||
| 337 | |||||||||||||||||||||
| 338 | sub parseDoctypeMarkupdecl { | ||||||||||||||||||||
| 339 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseDoctypeMarkupdecl: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 340 | # attribute => 'Doctype' | ||||||||||||||||||||
| 341 | # char => '>' | ||||||||||||||||||||
| 342 | # context => '#pop' | ||||||||||||||||||||
| 343 | # type => 'DetectChar' | ||||||||||||||||||||
| 344 | 0 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 345 | 0 | return 1 | |||||||||||||||||||
| 346 | } | ||||||||||||||||||||
| 347 | # attribute => 'Value' | ||||||||||||||||||||
| 348 | # char => '"' | ||||||||||||||||||||
| 349 | # context => 'Doctype Markupdecl DQ' | ||||||||||||||||||||
| 350 | # type => 'DetectChar' | ||||||||||||||||||||
| 351 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Doctype Markupdecl DQ', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 352 | 0 | return 1 | |||||||||||||||||||
| 353 | } | ||||||||||||||||||||
| 354 | # attribute => 'Value' | ||||||||||||||||||||
| 355 | # char => ''' | ||||||||||||||||||||
| 356 | # context => 'Doctype Markupdecl SQ' | ||||||||||||||||||||
| 357 | # type => 'DetectChar' | ||||||||||||||||||||
| 358 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Doctype Markupdecl SQ', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 359 | 0 | return 1 | |||||||||||||||||||
| 360 | } | ||||||||||||||||||||
| 361 | 0 | return 0; | |||||||||||||||||||
| 362 | }; | ||||||||||||||||||||
| 363 | |||||||||||||||||||||
| 364 | sub parseDoctypeMarkupdeclDQ { | ||||||||||||||||||||
| 365 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseDoctypeMarkupdeclDQ: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 366 | # attribute => 'Value' | ||||||||||||||||||||
| 367 | # char => '"' | ||||||||||||||||||||
| 368 | # context => '#pop' | ||||||||||||||||||||
| 369 | # type => 'DetectChar' | ||||||||||||||||||||
| 370 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 371 | 0 | return 1 | |||||||||||||||||||
| 372 | } | ||||||||||||||||||||
| 373 | # context => 'FindPEntityRefs' | ||||||||||||||||||||
| 374 | # type => 'IncludeRules' | ||||||||||||||||||||
| 375 | 0 | ▶ | if ($self->includeRules('FindPEntityRefs', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 376 | 0 | return 1 | |||||||||||||||||||
| 377 | } | ||||||||||||||||||||
| 378 | 0 | return 0; | |||||||||||||||||||
| 379 | }; | ||||||||||||||||||||
| 380 | |||||||||||||||||||||
| 381 | sub parseDoctypeMarkupdeclSQ { | ||||||||||||||||||||
| 382 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseDoctypeMarkupdeclSQ: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 383 | # attribute => 'Value' | ||||||||||||||||||||
| 384 | # char => ''' | ||||||||||||||||||||
| 385 | # context => '#pop' | ||||||||||||||||||||
| 386 | # type => 'DetectChar' | ||||||||||||||||||||
| 387 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 388 | 0 | return 1 | |||||||||||||||||||
| 389 | } | ||||||||||||||||||||
| 390 | # context => 'FindPEntityRefs' | ||||||||||||||||||||
| 391 | # type => 'IncludeRules' | ||||||||||||||||||||
| 392 | 0 | ▶ | if ($self->includeRules('FindPEntityRefs', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 393 | 0 | return 1 | |||||||||||||||||||
| 394 | } | ||||||||||||||||||||
| 395 | 0 | return 0; | |||||||||||||||||||
| 396 | }; | ||||||||||||||||||||
| 397 | |||||||||||||||||||||
| 398 | sub parseElClose { | ||||||||||||||||||||
| 399 | 160 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseElClose: called CC=3 SCAR=16.0
Pod
undocumented
| |||||||||||||||||||||
| 400 | # attribute => 'Element' | ||||||||||||||||||||
| 401 | # char => '>' | ||||||||||||||||||||
| 402 | # context => '#pop' | ||||||||||||||||||||
| 403 | # type => 'DetectChar' | ||||||||||||||||||||
| 404 | 160 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 405 | 160 | return 1 | |||||||||||||||||||
| 406 | } | ||||||||||||||||||||
| 407 | # String => '\S' | ||||||||||||||||||||
| 408 | # attribute => 'Error' | ||||||||||||||||||||
| 409 | # context => '#stay' | ||||||||||||||||||||
| 410 | # type => 'RegExpr' | ||||||||||||||||||||
| 411 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 412 | 0 | return 1 | |||||||||||||||||||
| 413 | } | ||||||||||||||||||||
| 414 | 0 | return 0; | |||||||||||||||||||
| 415 | }; | ||||||||||||||||||||
| 416 | |||||||||||||||||||||
| 417 | sub parseElClose2 { | ||||||||||||||||||||
| 418 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseElClose2: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 419 | # attribute => 'Element' | ||||||||||||||||||||
| 420 | # char => '>' | ||||||||||||||||||||
| 421 | # context => '#pop#pop#pop' | ||||||||||||||||||||
| 422 | # type => 'DetectChar' | ||||||||||||||||||||
| 423 | 0 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 424 | 0 | return 1 | |||||||||||||||||||
| 425 | } | ||||||||||||||||||||
| 426 | # String => '\S' | ||||||||||||||||||||
| 427 | # attribute => 'Error' | ||||||||||||||||||||
| 428 | # context => '#stay' | ||||||||||||||||||||
| 429 | # type => 'RegExpr' | ||||||||||||||||||||
| 430 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 431 | 0 | return 1 | |||||||||||||||||||
| 432 | } | ||||||||||||||||||||
| 433 | 0 | return 0; | |||||||||||||||||||
| 434 | }; | ||||||||||||||||||||
| 435 | |||||||||||||||||||||
| 436 | sub parseElClose3 { | ||||||||||||||||||||
| 437 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseElClose3: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 438 | # attribute => 'Element' | ||||||||||||||||||||
| 439 | # char => '>' | ||||||||||||||||||||
| 440 | # context => '#pop#pop#pop#pop' | ||||||||||||||||||||
| 441 | # type => 'DetectChar' | ||||||||||||||||||||
| 442 | 0 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop#pop#pop', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 443 | 0 | return 1 | |||||||||||||||||||
| 444 | } | ||||||||||||||||||||
| 445 | # String => '\S' | ||||||||||||||||||||
| 446 | # attribute => 'Error' | ||||||||||||||||||||
| 447 | # context => '#stay' | ||||||||||||||||||||
| 448 | # type => 'RegExpr' | ||||||||||||||||||||
| 449 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 450 | 0 | return 1 | |||||||||||||||||||
| 451 | } | ||||||||||||||||||||
| 452 | 0 | return 0; | |||||||||||||||||||
| 453 | }; | ||||||||||||||||||||
| 454 | |||||||||||||||||||||
| 455 | sub parseElOpen { | ||||||||||||||||||||
| 456 | 310 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseElOpen: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||
| 457 | # attribute => 'Element' | ||||||||||||||||||||
| 458 | # char => '/' | ||||||||||||||||||||
| 459 | # char1 => '>' | ||||||||||||||||||||
| 460 | # context => '#pop' | ||||||||||||||||||||
| 461 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 462 | 310 | ▶ | if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 463 | 22 | return 1 | |||||||||||||||||||
| 464 | } | ||||||||||||||||||||
| 465 | # attribute => 'Element' | ||||||||||||||||||||
| 466 | # char => '>' | ||||||||||||||||||||
| 467 | # context => '#pop' | ||||||||||||||||||||
| 468 | # type => 'DetectChar' | ||||||||||||||||||||
| 469 | 288 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 470 | 162 | return 1 | |||||||||||||||||||
| 471 | } | ||||||||||||||||||||
| 472 | # context => 'FindAttributes' | ||||||||||||||||||||
| 473 | # type => 'IncludeRules' | ||||||||||||||||||||
| 474 | 126 | ▶ | if ($self->includeRules('FindAttributes', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 475 | 104 | return 1 | |||||||||||||||||||
| 476 | } | ||||||||||||||||||||
| 477 | # String => '\S' | ||||||||||||||||||||
| 478 | # attribute => 'Error' | ||||||||||||||||||||
| 479 | # context => '#stay' | ||||||||||||||||||||
| 480 | # type => 'RegExpr' | ||||||||||||||||||||
| 481 | 22 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 482 | 0 | return 1 | |||||||||||||||||||
| 483 | } | ||||||||||||||||||||
| 484 | 22 | return 0; | |||||||||||||||||||
| 485 | }; | ||||||||||||||||||||
| 486 | |||||||||||||||||||||
| 487 | sub parseFindAttributes { | ||||||||||||||||||||
| 488 | 126 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindAttributes: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||
| 489 | # String => '[A-Za-z_:][\w.:_-]*' | ||||||||||||||||||||
| 490 | # attribute => 'Attribute' | ||||||||||||||||||||
| 491 | # column => '0' | ||||||||||||||||||||
| 492 | # context => '#stay' | ||||||||||||||||||||
| 493 | # type => 'RegExpr' | ||||||||||||||||||||
| 494 | 126 | ▶ | if ($self->testRegExpr($text, '[A-Za-z_:][\\w.:_-]*', 0, 0, 0, 0, 0, '#stay', 'Attribute')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 495 | 0 | return 1 | |||||||||||||||||||
| 496 | } | ||||||||||||||||||||
| 497 | # String => '\s+[A-Za-z_:][\w.:_-]*' | ||||||||||||||||||||
| 498 | # attribute => 'Attribute' | ||||||||||||||||||||
| 499 | # context => '#stay' | ||||||||||||||||||||
| 500 | # type => 'RegExpr' | ||||||||||||||||||||
| 501 | 126 | ▶ | if ($self->testRegExpr($text, '\\s+[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, '#stay', 'Attribute')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 502 | 52 | return 1 | |||||||||||||||||||
| 503 | } | ||||||||||||||||||||
| 504 | # attribute => 'Attribute' | ||||||||||||||||||||
| 505 | # char => '=' | ||||||||||||||||||||
| 506 | # context => 'Value' | ||||||||||||||||||||
| 507 | # type => 'DetectChar' | ||||||||||||||||||||
| 508 | 74 | ▶ | if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Attribute')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 509 | 52 | return 1 | |||||||||||||||||||
| 510 | } | ||||||||||||||||||||
| 511 | 22 | return 0; | |||||||||||||||||||
| 512 | }; | ||||||||||||||||||||
| 513 | |||||||||||||||||||||
| 514 | sub parseFindDTDRules { | ||||||||||||||||||||
| 515 | 960 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindDTDRules: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||
| 516 | # String => '<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b' | ||||||||||||||||||||
| 517 | # attribute => 'Doctype' | ||||||||||||||||||||
| 518 | # context => 'Doctype Markupdecl' | ||||||||||||||||||||
| 519 | # type => 'RegExpr' | ||||||||||||||||||||
| 520 | 960 | ▶ | if ($self->testRegExpr($text, '<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\\b', 0, 0, 0, undef, 0, 'Doctype Markupdecl', 'Doctype')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 521 | 0 | return 1 | |||||||||||||||||||
| 522 | } | ||||||||||||||||||||
| 523 | 960 | return 0; | |||||||||||||||||||
| 524 | }; | ||||||||||||||||||||
| 525 | |||||||||||||||||||||
| 526 | sub parseFindEntityRefs { | ||||||||||||||||||||
| 527 | 1708 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindEntityRefs: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||
| 528 | # String => '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);' | ||||||||||||||||||||
| 529 | # attribute => 'EntityRef' | ||||||||||||||||||||
| 530 | # context => '#stay' | ||||||||||||||||||||
| 531 | # type => 'RegExpr' | ||||||||||||||||||||
| 532 | 1708 | ▶ | if ($self->testRegExpr($text, '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);', 0, 0, 0, undef, 0, '#stay', 'EntityRef')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 533 | 22 | return 1 | |||||||||||||||||||
| 534 | } | ||||||||||||||||||||
| 535 | # String => '&<' | ||||||||||||||||||||
| 536 | # attribute => 'Error' | ||||||||||||||||||||
| 537 | # context => '#stay' | ||||||||||||||||||||
| 538 | # type => 'AnyChar' | ||||||||||||||||||||
| 539 | 1686 | ▶ | if ($self->testAnyChar($text, '&<', 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 540 | 0 | return 1 | |||||||||||||||||||
| 541 | } | ||||||||||||||||||||
| 542 | 1686 | return 0; | |||||||||||||||||||
| 543 | }; | ||||||||||||||||||||
| 544 | |||||||||||||||||||||
| 545 | sub parseFindHTML { | ||||||||||||||||||||
| 546 | 1828 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindHTML: called CC=19 SCAR=31.9
Pod
undocumented
| |||||||||||||||||||||
| 547 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 548 | 1828 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 549 | 38 | return 1 | |||||||||||||||||||
| 550 | } | ||||||||||||||||||||
| 551 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 552 | 1790 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 553 | 480 | return 1 | |||||||||||||||||||
| 554 | } | ||||||||||||||||||||
| 555 | # String => '<!--' | ||||||||||||||||||||
| 556 | # attribute => 'Comment' | ||||||||||||||||||||
| 557 | # beginRegion => 'comment' | ||||||||||||||||||||
| 558 | # context => 'Comment' | ||||||||||||||||||||
| 559 | # type => 'StringDetect' | ||||||||||||||||||||
| 560 | 1310 | ▶ | if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 561 | 4 | return 1 | |||||||||||||||||||
| 562 | } | ||||||||||||||||||||
| 563 | # String => '<![CDATA[' | ||||||||||||||||||||
| 564 | # attribute => 'CDATA' | ||||||||||||||||||||
| 565 | # beginRegion => 'cdata' | ||||||||||||||||||||
| 566 | # context => 'CDATA' | ||||||||||||||||||||
| 567 | # type => 'StringDetect' | ||||||||||||||||||||
| 568 | 1306 | ▶ | if ($self->testStringDetect($text, '<![CDATA[', 0, 0, 0, undef, 0, 'CDATA', 'CDATA')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 569 | 0 | return 1 | |||||||||||||||||||
| 570 | } | ||||||||||||||||||||
| 571 | # String => '<!DOCTYPE\s+' | ||||||||||||||||||||
| 572 | # attribute => 'Doctype' | ||||||||||||||||||||
| 573 | # beginRegion => 'doctype' | ||||||||||||||||||||
| 574 | # context => 'Doctype' | ||||||||||||||||||||
| 575 | # type => 'RegExpr' | ||||||||||||||||||||
| 576 | 1306 | ▶ | if ($self->testRegExpr($text, '<!DOCTYPE\\s+', 0, 0, 0, undef, 0, 'Doctype', 'Doctype')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 577 | 2 | return 1 | |||||||||||||||||||
| 578 | } | ||||||||||||||||||||
| 579 | # String => '<\?[\w:-]*' | ||||||||||||||||||||
| 580 | # attribute => 'Processing Instruction' | ||||||||||||||||||||
| 581 | # beginRegion => 'pi' | ||||||||||||||||||||
| 582 | # context => 'PI' | ||||||||||||||||||||
| 583 | # type => 'RegExpr' | ||||||||||||||||||||
| 584 | 1304 | ▶ | if ($self->testRegExpr($text, '<\\?[\\w:-]*', 0, 0, 0, undef, 0, 'PI', 'Processing Instruction')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 585 | 0 | return 1 | |||||||||||||||||||
| 586 | } | ||||||||||||||||||||
| 587 | # String => '<style\b' | ||||||||||||||||||||
| 588 | # attribute => 'Element' | ||||||||||||||||||||
| 589 | # beginRegion => 'style' | ||||||||||||||||||||
| 590 | # context => 'CSS' | ||||||||||||||||||||
| 591 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 592 | # type => 'RegExpr' | ||||||||||||||||||||
| 593 | 1304 | ▶ | if ($self->testRegExpr($text, '<style\\b', 1, 0, 0, undef, 0, 'CSS', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 594 | 0 | return 1 | |||||||||||||||||||
| 595 | } | ||||||||||||||||||||
| 596 | # String => '<script\b' | ||||||||||||||||||||
| 597 | # attribute => 'Element' | ||||||||||||||||||||
| 598 | # beginRegion => 'script' | ||||||||||||||||||||
| 599 | # context => 'JS' | ||||||||||||||||||||
| 600 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 601 | # type => 'RegExpr' | ||||||||||||||||||||
| 602 | 1304 | ▶ | if ($self->testRegExpr($text, '<script\\b', 1, 0, 0, undef, 0, 'JS', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 603 | 0 | return 1 | |||||||||||||||||||
| 604 | } | ||||||||||||||||||||
| 605 | # String => '<pre\b' | ||||||||||||||||||||
| 606 | # attribute => 'Element' | ||||||||||||||||||||
| 607 | # beginRegion => 'pre' | ||||||||||||||||||||
| 608 | # context => 'El Open' | ||||||||||||||||||||
| 609 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 610 | # type => 'RegExpr' | ||||||||||||||||||||
| 611 | 1304 | ▶ | if ($self->testRegExpr($text, '<pre\\b', 1, 0, 0, undef, 0, 'El Open', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 612 | 8 | return 1 | |||||||||||||||||||
| 613 | } | ||||||||||||||||||||
| 614 | # String => '<div\b' | ||||||||||||||||||||
| 615 | # attribute => 'Element' | ||||||||||||||||||||
| 616 | # beginRegion => 'div' | ||||||||||||||||||||
| 617 | # context => 'El Open' | ||||||||||||||||||||
| 618 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 619 | # type => 'RegExpr' | ||||||||||||||||||||
| 620 | 1296 | ▶ | if ($self->testRegExpr($text, '<div\\b', 1, 0, 0, undef, 0, 'El Open', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 621 | 0 | return 1 | |||||||||||||||||||
| 622 | } | ||||||||||||||||||||
| 623 | # String => '<table\b' | ||||||||||||||||||||
| 624 | # attribute => 'Element' | ||||||||||||||||||||
| 625 | # beginRegion => 'table' | ||||||||||||||||||||
| 626 | # context => 'El Open' | ||||||||||||||||||||
| 627 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 628 | # type => 'RegExpr' | ||||||||||||||||||||
| 629 | 1296 | ▶ | if ($self->testRegExpr($text, '<table\\b', 1, 0, 0, undef, 0, 'El Open', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 630 | 0 | return 1 | |||||||||||||||||||
| 631 | } | ||||||||||||||||||||
| 632 | # String => '<[A-Za-z_:][\w.:_-]*' | ||||||||||||||||||||
| 633 | # attribute => 'Element' | ||||||||||||||||||||
| 634 | # context => 'El Open' | ||||||||||||||||||||
| 635 | # type => 'RegExpr' | ||||||||||||||||||||
| 636 | 1296 | ▶ | if ($self->testRegExpr($text, '<[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, 'El Open', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 637 | 176 | return 1 | |||||||||||||||||||
| 638 | } | ||||||||||||||||||||
| 639 | # String => '</pre\b' | ||||||||||||||||||||
| 640 | # attribute => 'Element' | ||||||||||||||||||||
| 641 | # context => 'El Close' | ||||||||||||||||||||
| 642 | # endRegion => 'pre' | ||||||||||||||||||||
| 643 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 644 | # type => 'RegExpr' | ||||||||||||||||||||
| 645 | 1120 | ▶ | if ($self->testRegExpr($text, '</pre\\b', 1, 0, 0, undef, 0, 'El Close', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 646 | 8 | return 1 | |||||||||||||||||||
| 647 | } | ||||||||||||||||||||
| 648 | # String => '</div\b' | ||||||||||||||||||||
| 649 | # attribute => 'Element' | ||||||||||||||||||||
| 650 | # context => 'El Close' | ||||||||||||||||||||
| 651 | # endRegion => 'div' | ||||||||||||||||||||
| 652 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 653 | # type => 'RegExpr' | ||||||||||||||||||||
| 654 | 1112 | ▶ | if ($self->testRegExpr($text, '</div\\b', 1, 0, 0, undef, 0, 'El Close', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 655 | 0 | return 1 | |||||||||||||||||||
| 656 | } | ||||||||||||||||||||
| 657 | # String => '</table\b' | ||||||||||||||||||||
| 658 | # attribute => 'Element' | ||||||||||||||||||||
| 659 | # context => 'El Close' | ||||||||||||||||||||
| 660 | # endRegion => 'table' | ||||||||||||||||||||
| 661 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 662 | # type => 'RegExpr' | ||||||||||||||||||||
| 663 | 1112 | ▶ | if ($self->testRegExpr($text, '</table\\b', 1, 0, 0, undef, 0, 'El Close', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 664 | 0 | return 1 | |||||||||||||||||||
| 665 | } | ||||||||||||||||||||
| 666 | # String => '</[A-Za-z_:][\w.:_-]*' | ||||||||||||||||||||
| 667 | # attribute => 'Element' | ||||||||||||||||||||
| 668 | # context => 'El Close' | ||||||||||||||||||||
| 669 | # type => 'RegExpr' | ||||||||||||||||||||
| 670 | 1112 | ▶ | if ($self->testRegExpr($text, '</[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, 'El Close', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 671 | 152 | return 1 | |||||||||||||||||||
| 672 | } | ||||||||||||||||||||
| 673 | # context => 'FindDTDRules' | ||||||||||||||||||||
| 674 | # type => 'IncludeRules' | ||||||||||||||||||||
| 675 | 960 | ▶ | if ($self->includeRules('FindDTDRules', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 676 | 0 | return 1 | |||||||||||||||||||
| 677 | } | ||||||||||||||||||||
| 678 | # context => 'FindEntityRefs' | ||||||||||||||||||||
| 679 | # type => 'IncludeRules' | ||||||||||||||||||||
| 680 | 960 | ▶ | if ($self->includeRules('FindEntityRefs', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 681 | 22 | return 1 | |||||||||||||||||||
| 682 | } | ||||||||||||||||||||
| 683 | 938 | return 0; | |||||||||||||||||||
| 684 | }; | ||||||||||||||||||||
| 685 | |||||||||||||||||||||
| 686 | sub parseFindPEntityRefs { | ||||||||||||||||||||
| 687 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindPEntityRefs: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 688 | # String => '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);' | ||||||||||||||||||||
| 689 | # attribute => 'EntityRef' | ||||||||||||||||||||
| 690 | # context => '#stay' | ||||||||||||||||||||
| 691 | # type => 'RegExpr' | ||||||||||||||||||||
| 692 | 0 | ▶ | if ($self->testRegExpr($text, '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);', 0, 0, 0, undef, 0, '#stay', 'EntityRef')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 693 | 0 | return 1 | |||||||||||||||||||
| 694 | } | ||||||||||||||||||||
| 695 | # String => '%[A-Za-z_:][\w.:_-]*;' | ||||||||||||||||||||
| 696 | # attribute => 'PEntityRef' | ||||||||||||||||||||
| 697 | # context => '#stay' | ||||||||||||||||||||
| 698 | # type => 'RegExpr' | ||||||||||||||||||||
| 699 | 0 | ▶ | if ($self->testRegExpr($text, '%[A-Za-z_:][\\w.:_-]*;', 0, 0, 0, undef, 0, '#stay', 'PEntityRef')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 700 | 0 | return 1 | |||||||||||||||||||
| 701 | } | ||||||||||||||||||||
| 702 | # String => '&%' | ||||||||||||||||||||
| 703 | # attribute => 'Error' | ||||||||||||||||||||
| 704 | # context => '#stay' | ||||||||||||||||||||
| 705 | # type => 'AnyChar' | ||||||||||||||||||||
| 706 | 0 | ▶ | if ($self->testAnyChar($text, '&%', 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 707 | 0 | return 1 | |||||||||||||||||||
| 708 | } | ||||||||||||||||||||
| 709 | 0 | return 0; | |||||||||||||||||||
| 710 | }; | ||||||||||||||||||||
| 711 | |||||||||||||||||||||
| 712 | sub parseJS { | ||||||||||||||||||||
| 713 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseJS: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 714 | # attribute => 'Element' | ||||||||||||||||||||
| 715 | # char => '/' | ||||||||||||||||||||
| 716 | # char1 => '>' | ||||||||||||||||||||
| 717 | # context => '#pop' | ||||||||||||||||||||
| 718 | # endRegion => 'script' | ||||||||||||||||||||
| 719 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 720 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 721 | 0 | return 1 | |||||||||||||||||||
| 722 | } | ||||||||||||||||||||
| 723 | # attribute => 'Element' | ||||||||||||||||||||
| 724 | # char => '>' | ||||||||||||||||||||
| 725 | # context => 'JS content' | ||||||||||||||||||||
| 726 | # type => 'DetectChar' | ||||||||||||||||||||
| 727 | 0 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'JS content', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 728 | 0 | return 1 | |||||||||||||||||||
| 729 | } | ||||||||||||||||||||
| 730 | # context => 'FindAttributes' | ||||||||||||||||||||
| 731 | # type => 'IncludeRules' | ||||||||||||||||||||
| 732 | 0 | ▶ | if ($self->includeRules('FindAttributes', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 733 | 0 | return 1 | |||||||||||||||||||
| 734 | } | ||||||||||||||||||||
| 735 | # String => '\S' | ||||||||||||||||||||
| 736 | # attribute => 'Error' | ||||||||||||||||||||
| 737 | # context => '#stay' | ||||||||||||||||||||
| 738 | # type => 'RegExpr' | ||||||||||||||||||||
| 739 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 740 | 0 | return 1 | |||||||||||||||||||
| 741 | } | ||||||||||||||||||||
| 742 | 0 | return 0; | |||||||||||||||||||
| 743 | }; | ||||||||||||||||||||
| 744 | |||||||||||||||||||||
| 745 | sub parseJScommentclose { | ||||||||||||||||||||
| 746 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseJScommentclose: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 747 | # String => '</script\b' | ||||||||||||||||||||
| 748 | # attribute => 'Element' | ||||||||||||||||||||
| 749 | # context => 'El Close 3' | ||||||||||||||||||||
| 750 | # endRegion => 'script' | ||||||||||||||||||||
| 751 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 752 | # type => 'RegExpr' | ||||||||||||||||||||
| 753 | 0 | ▶ | if ($self->testRegExpr($text, '</script\\b', 1, 0, 0, undef, 0, 'El Close 3', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 754 | 0 | return 1 | |||||||||||||||||||
| 755 | } | ||||||||||||||||||||
| 756 | # context => '##Alerts' | ||||||||||||||||||||
| 757 | # type => 'IncludeRules' | ||||||||||||||||||||
| 758 | 0 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 759 | 0 | return 1 | |||||||||||||||||||
| 760 | } | ||||||||||||||||||||
| 761 | 0 | return 0; | |||||||||||||||||||
| 762 | }; | ||||||||||||||||||||
| 763 | |||||||||||||||||||||
| 764 | sub parseJScontent { | ||||||||||||||||||||
| 765 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseJScontent: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 766 | # String => '</script\b' | ||||||||||||||||||||
| 767 | # attribute => 'Element' | ||||||||||||||||||||
| 768 | # context => 'El Close 2' | ||||||||||||||||||||
| 769 | # endRegion => 'script' | ||||||||||||||||||||
| 770 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 771 | # type => 'RegExpr' | ||||||||||||||||||||
| 772 | 0 | ▶ | if ($self->testRegExpr($text, '</script\\b', 1, 0, 0, undef, 0, 'El Close 2', 'Element')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 773 | 0 | return 1 | |||||||||||||||||||
| 774 | } | ||||||||||||||||||||
| 775 | # String => '//(?=.*</script\b)' | ||||||||||||||||||||
| 776 | # attribute => 'Comment' | ||||||||||||||||||||
| 777 | # context => 'JS comment close' | ||||||||||||||||||||
| 778 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 779 | # type => 'RegExpr' | ||||||||||||||||||||
| 780 | 0 | ▶ | if ($self->testRegExpr($text, '//(?=.*</script\\b)', 1, 0, 0, undef, 0, 'JS comment close', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 781 | 0 | return 1 | |||||||||||||||||||
| 782 | } | ||||||||||||||||||||
| 783 | # context => '##JavaScript' | ||||||||||||||||||||
| 784 | # includeAttrib => 'true' | ||||||||||||||||||||
| 785 | # type => 'IncludeRules' | ||||||||||||||||||||
| 786 | 0 | ▶ | if ($self->includePlugin('JavaScript', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 787 | 0 | return 1 | |||||||||||||||||||
| 788 | } | ||||||||||||||||||||
| 789 | 0 | return 0; | |||||||||||||||||||
| 790 | }; | ||||||||||||||||||||
| 791 | |||||||||||||||||||||
| 792 | sub parsePI { | ||||||||||||||||||||
| 793 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parsePI: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 794 | # attribute => 'Processing Instruction' | ||||||||||||||||||||
| 795 | # char => '?' | ||||||||||||||||||||
| 796 | # char1 => '>' | ||||||||||||||||||||
| 797 | # context => '#pop' | ||||||||||||||||||||
| 798 | # endRegion => 'pi' | ||||||||||||||||||||
| 799 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 800 | 0 | ▶ | if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '#pop', 'Processing Instruction')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 801 | 0 | return 1 | |||||||||||||||||||
| 802 | } | ||||||||||||||||||||
| 803 | 0 | return 0; | |||||||||||||||||||
| 804 | }; | ||||||||||||||||||||
| 805 | |||||||||||||||||||||
| 806 | sub parseStart { | ||||||||||||||||||||
| 807 | 1828 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseStart: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 808 | # context => 'FindHTML' | ||||||||||||||||||||
| 809 | # type => 'IncludeRules' | ||||||||||||||||||||
| 810 | 1828 | ▶ | if ($self->includeRules('FindHTML', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 811 | 890 | return 1 | |||||||||||||||||||
| 812 | } | ||||||||||||||||||||
| 813 | 938 | return 0; | |||||||||||||||||||
| 814 | }; | ||||||||||||||||||||
| 815 | |||||||||||||||||||||
| 816 | sub parseValue { | ||||||||||||||||||||
| 817 | 52 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseValue: called CC=4 SCAR=22.9
Pod
undocumented
| |||||||||||||||||||||
| 818 | # attribute => 'Value' | ||||||||||||||||||||
| 819 | # char => '"' | ||||||||||||||||||||
| 820 | # context => 'Value DQ' | ||||||||||||||||||||
| 821 | # type => 'DetectChar' | ||||||||||||||||||||
| 822 | 52 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Value DQ', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 823 | 52 | return 1 | |||||||||||||||||||
| 824 | } | ||||||||||||||||||||
| 825 | # attribute => 'Value' | ||||||||||||||||||||
| 826 | # char => ''' | ||||||||||||||||||||
| 827 | # context => 'Value SQ' | ||||||||||||||||||||
| 828 | # type => 'DetectChar' | ||||||||||||||||||||
| 829 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Value SQ', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 830 | 0 | return 1 | |||||||||||||||||||
| 831 | } | ||||||||||||||||||||
| 832 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 833 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 834 | 0 | return 1 | |||||||||||||||||||
| 835 | } | ||||||||||||||||||||
| 836 | 0 | return 0; | |||||||||||||||||||
| 837 | }; | ||||||||||||||||||||
| 838 | |||||||||||||||||||||
| 839 | sub parseValueDQ { | ||||||||||||||||||||
| 840 | 800 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseValueDQ: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||
| 841 | # attribute => 'Value' | ||||||||||||||||||||
| 842 | # char => '"' | ||||||||||||||||||||
| 843 | # context => '#pop#pop' | ||||||||||||||||||||
| 844 | # type => 'DetectChar' | ||||||||||||||||||||
| 845 | 800 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 846 | 52 | return 1 | |||||||||||||||||||
| 847 | } | ||||||||||||||||||||
| 848 | # context => 'FindEntityRefs' | ||||||||||||||||||||
| 849 | # type => 'IncludeRules' | ||||||||||||||||||||
| 850 | 748 | ▶ | if ($self->includeRules('FindEntityRefs', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 851 | 0 | return 1 | |||||||||||||||||||
| 852 | } | ||||||||||||||||||||
| 853 | 748 | return 0; | |||||||||||||||||||
| 854 | }; | ||||||||||||||||||||
| 855 | |||||||||||||||||||||
| 856 | sub parseValueNQ { | ||||||||||||||||||||
| 857 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseValueNQ: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 858 | # context => 'FindEntityRefs' | ||||||||||||||||||||
| 859 | # type => 'IncludeRules' | ||||||||||||||||||||
| 860 | 0 | ▶ | if ($self->includeRules('FindEntityRefs', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 861 | 0 | return 1 | |||||||||||||||||||
| 862 | } | ||||||||||||||||||||
| 863 | # String => '/(?!>)' | ||||||||||||||||||||
| 864 | # attribute => 'Value' | ||||||||||||||||||||
| 865 | # context => '#stay' | ||||||||||||||||||||
| 866 | # type => 'RegExpr' | ||||||||||||||||||||
| 867 | 0 | ▶ | if ($self->testRegExpr($text, '/(?!>)', 0, 0, 0, undef, 0, '#stay', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 868 | 0 | return 1 | |||||||||||||||||||
| 869 | } | ||||||||||||||||||||
| 870 | # String => '[^/><"'\s]' | ||||||||||||||||||||
| 871 | # attribute => 'Value' | ||||||||||||||||||||
| 872 | # context => '#stay' | ||||||||||||||||||||
| 873 | # type => 'RegExpr' | ||||||||||||||||||||
| 874 | 0 | ▶ | if ($self->testRegExpr($text, '[^/><"\'\\s]', 0, 0, 0, undef, 0, '#stay', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 875 | 0 | return 1 | |||||||||||||||||||
| 876 | } | ||||||||||||||||||||
| 877 | 0 | return 0; | |||||||||||||||||||
| 878 | }; | ||||||||||||||||||||
| 879 | |||||||||||||||||||||
| 880 | sub parseValueSQ { | ||||||||||||||||||||
| 881 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseValueSQ: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 882 | # attribute => 'Value' | ||||||||||||||||||||
| 883 | # char => ''' | ||||||||||||||||||||
| 884 | # context => '#pop#pop' | ||||||||||||||||||||
| 885 | # type => 'DetectChar' | ||||||||||||||||||||
| 886 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Value')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 887 | 0 | return 1 | |||||||||||||||||||
| 888 | } | ||||||||||||||||||||
| 889 | # context => 'FindEntityRefs' | ||||||||||||||||||||
| 890 | # type => 'IncludeRules' | ||||||||||||||||||||
| 891 | 0 | ▶ | if ($self->includeRules('FindEntityRefs', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 892 | 0 | return 1 | |||||||||||||||||||
| 893 | } | ||||||||||||||||||||
| 894 | 0 | return 0; | |||||||||||||||||||
| 895 | }; | ||||||||||||||||||||
| 896 | |||||||||||||||||||||
| 897 | |||||||||||||||||||||
| 898 | 1 | 1; | |||||||||||||||||||
| 899 | |||||||||||||||||||||
| 900 | __END__ | ||||||||||||||||||||