Kate/Wikimedia.pm

filter: Statementstmt 15.6% 22 / 141 Branchbran 0.0% 0 / 96 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 25.0% 4 / 16 Podpod 0.0% 0 / 13 totaltotal 9.9% 27 / 271 CC 50 SCAR 52.1
CC
50
Cov
10%
parseTable
380.0
parsenormal
272.0
parseNoWiki
30.0
CRAP 183.8
« Kate/JavaScript_PHP.pm ↑ Summary Kate/Convert/XMLData.pm »
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 'mediawiki.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.00
9 #kate version 2.4
10 #generated: Sun Feb 3 22:02:06 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::Wikimedia;
13  
14 1 our $VERSION = '0.16';
15  
16 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
21 1 my $proto = shift;
22 1 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
23 1 my $self = $class->SUPER::new(@_);
24 1 $self->attributes({
25 'Comment' => 'Comment',
26 'Error' => 'Error',
27 'HTML-Entity' => 'DecVal',
28 'HTML-Tag' => 'Keyword',
29 'Link' => 'Others',
30 'NoWiki' => 'Normal',
31 'Normal' => 'Normal',
32 'Section' => 'Keyword',
33 'URL' => 'Others',
34 'Unformatted' => 'Normal',
35 'Wiki-Tag' => 'DecVal',
36 });
37 1 $self->contextdata({
38 'Error' => {
39 callback => \&parseError,
40 attribute => 'Error',
41 lineending => '#pop',
42 },
43 'Link' => {
44 callback => \&parseLink,
45 attribute => 'Template',
46 },
47 'NoWiki' => {
48 callback => \&parseNoWiki,
49 attribute => 'NoWiki',
50 },
51 'Pre' => {
52 callback => \&parsePre,
53 attribute => 'NoWiki',
54 },
55 'Table' => {
56 callback => \&parseTable,
57 attribute => 'Normal',
58 },
59 'Template' => {
60 callback => \&parseTemplate,
61 attribute => 'Link',
62 },
63 'URL' => {
64 callback => \&parseURL,
65 attribute => 'Link',
66 },
67 'Unformatted' => {
68 callback => \&parseUnformatted,
69 attribute => 'Unformatted',
70 lineending => '#pop',
71 },
72 'WikiLink' => {
73 callback => \&parseWikiLink,
74 attribute => 'Link',
75 },
76 'comment' => {
77 callback => \&parsecomment,
78 attribute => 'Comment',
79 },
80 'normal' => {
81 callback => \&parsenormal,
82 attribute => 'Normal',
83 },
84 });
85 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
86 1 $self->basecontext('normal');
87 1 $self->keywordscase(0);
88 1 $self->initialize;
89 1 bless ($self, $class);
90 1 return $self;
91 }
92  
93 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
94 0 return 'Wikimedia';
95 }
96  
97 0 ▶sub parseError {
Subroutine parseError: not called CC=1 SCAR=6.9
Pod undocumented
98 0 my ($self, $text) = @_;
99 0 return 0;
100 };
101  
102 0 ▶sub parseLink {
Subroutine parseLink: not called CC=3 SCAR=24.8
Pod undocumented
103 0 my ($self, $text) = @_;
104 # attribute => 'Wiki-Tag'
105 # char => '}'
106 # char1 => '}'
107 # context => '#pop'
108 # type => 'Detect2Chars'
109 0 ▶ if ($self->testDetect2Chars($text, '}', '}', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "}", "}", 0, 0, 0, undef, 0, "#pop", "Wiki-Tag")) 0 0 0
110 0 return 1
111 }
112 # String => ''[]'
113 # attribute => 'Error'
114 # context => 'Error'
115 # type => 'AnyChar'
116 0 ▶ if ($self->testAnyChar($text, '\'[]', 0, 0, undef, 0, 'Error', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "'[]", 0, 0, undef, 0, "Error", "Error")) 0 0 0
117 0 return 1
118 }
119 0 return 0;
120 };
121  
122 0 ▶sub parseNoWiki {
Subroutine parseNoWiki: not called CC=5 SCAR=34.0
Pod undocumented
123 0 my ($self, $text) = @_;
124 # String => '<!--[^-]*-->'
125 # attribute => 'NoWiki'
126 # type => 'RegExpr'
127 0 ▶ if ($self->testRegExpr($text, '<!--[^-]*-->', 0, 0, 0, undef, 0, '#stay', 'NoWiki')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<!--[^-]*-->", 0, 0, 0, undef, 0, "#stay", "NoWiki")) 0 0 0
128 0 return 1
129 }
130 # String => '</nowiki>'
131 # attribute => 'Wiki-Tag'
132 # context => '#pop'
133 # type => 'StringDetect'
134 0 ▶ if ($self->testStringDetect($text, '</nowiki>', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "</nowiki>", 0, 0, 0, undef, 0, "#pop", "Wiki-Tag")) 0 0 0
135 0 return 1
136 }
137 # String => '[<][^>]+[>]'
138 # attribute => 'HTML-Tag'
139 # context => '#stay'
140 # type => 'RegExpr'
141 0 ▶ if ($self->testRegExpr($text, '[<][^>]+[>]', 0, 0, 0, undef, 0, '#stay', 'HTML-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[<][^>]+[>]", 0, 0, 0, undef, 0, "#stay", "HTML-Tag")) 0 0 0
142 0 return 1
143 }
144 # String => '<pre>'
145 # attribute => 'HTML-Tag'
146 # context => 'Pre'
147 # type => 'StringDetect'
148 0 ▶ if ($self->testStringDetect($text, '<pre>', 0, 0, 0, undef, 0, 'Pre', 'HTML-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<pre>", 0, 0, 0, undef, 0, "Pre", "HTML-Tag")) 0 0 0
149 0 return 1
150 }
151 0 return 0;
152 };
153  
154 0 ▶sub parsePre {
Subroutine parsePre: not called CC=2 SCAR=17.9
Pod undocumented
155 0 my ($self, $text) = @_;
156 # String => '</pre>'
157 # attribute => 'Wiki-Tag'
158 # context => '#pop'
159 # type => 'StringDetect'
160 0 ▶ if ($self->testStringDetect($text, '</pre>', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "</pre>", 0, 0, 0, undef, 0, "#pop", "Wiki-Tag")) 0 0 0
161 0 return 1
162 }
163 0 return 0;
164 };
165  
166 0 ▶sub parseTable {
Subroutine parseTable: not called CC=19 SCAR=59.4
Pod undocumented
167 0 my ($self, $text) = @_;
168 # String => '<!--'
169 # attribute => 'Comment'
170 # context => 'comment'
171 # type => 'StringDetect'
172 0 ▶ if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<!--", 0, 0, 0, undef, 0, "comment", "Comment")) 0 0 0
173 0 return 1
174 }
175 # String => '([=]{2,2}[^=]+[=]{2,2}|[=]{3,3}[^=]+[=]{3,3}|[=]{4,4}[^=]+[=]{4,4}|[=]{5,5}[^=]+[=]{5,5})'
176 # attribute => 'Section'
177 # column => '0'
178 # context => '#stay'
179 # type => 'RegExpr'
180 0 ▶ if ($self->testRegExpr($text, '([=]{2,2}[^=]+[=]{2,2}|[=]{3,3}[^=]+[=]{3,3}|[=]{4,4}[^=]+[=]{4,4}|[=]{5,5}[^=]+[=]{5,5})', 0, 0, 0, 0, 0, '#stay', 'Section')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "([=]{2,2}[^=]+[=]{2,2}|[=]{3,3}[^=]+[=]{3,3}|[=]{4,4}[^=]+[=]{4,4}|[=]{5,5}[^=]+[=]{5,5})", 0, 0, 0, 0, 0, "#stay", "Section")) 0 0 0
181 0 return 1
182 }
183 # String => '[*#;:\s]*[*#:]+'
184 # attribute => 'Wiki-Tag'
185 # column => '0'
186 # context => '#stay'
187 # type => 'RegExpr'
188 0 ▶ if ($self->testRegExpr($text, '[*#;:\\s]*[*#:]+', 0, 0, 0, 0, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[*#;:\\s]*[*#:]+", 0, 0, 0, 0, 0, "#stay", "Wiki-Tag")) 0 0 0
189 0 return 1
190 }
191 # String => '[[](?![[])'
192 # attribute => 'Wiki-Tag'
193 # context => 'URL'
194 # type => 'RegExpr'
195 0 ▶ if ($self->testRegExpr($text, '[[](?![[])', 0, 0, 0, undef, 0, 'URL', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[[](?![[])", 0, 0, 0, undef, 0, "URL", "Wiki-Tag")) 0 0 0
196 0 return 1
197 }
198 # String => '(http:|ftp:|mailto:)[\S]*($|[\s])'
199 # attribute => 'URL'
200 # context => '#stay'
201 # type => 'RegExpr'
202 0 ▶ if ($self->testRegExpr($text, '(http:|ftp:|mailto:)[\\S]*($|[\\s])', 0, 0, 0, undef, 0, '#stay', 'URL')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(http:|ftp:|mailto:)[\\S]*(\$|[\\s])", 0, 0, 0, undef, 0, "#stay", "URL")) 0 0 0
203 0 return 1
204 }
205 # String => '[']{2,}'
206 # attribute => 'Wiki-Tag'
207 # context => '#stay'
208 # type => 'RegExpr'
209 0 ▶ if ($self->testRegExpr($text, '[\']{2,}', 0, 0, 0, undef, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[']{2,}", 0, 0, 0, undef, 0, "#stay", "Wiki-Tag")) 0 0 0
210 0 return 1
211 }
212 # attribute => 'Wiki-Tag'
213 # char => '|'
214 # char1 => '}'
215 # column => '0'
216 # context => '#pop'
217 # endRegion => 'table'
218 # type => 'Detect2Chars'
219 0 ▶ if ($self->testDetect2Chars($text, '|', '}', 0, 0, 0, 0, 0, '#pop', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "|", "}", 0, 0, 0, 0, 0, "#pop", "Wiki-Tag")) 0 0 0
220 0 return 1
221 }
222 # attribute => 'Wiki-Tag'
223 # char => '|'
224 # context => '#stay'
225 # type => 'DetectChar'
226 0 ▶ if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "|", 0, 0, 0, undef, 0, "#stay", "Wiki-Tag")) 0 0 0
227 0 return 1
228 }
229 # attribute => 'Wiki-Tag'
230 # char => '{'
231 # char1 => '{'
232 # context => 'Template'
233 # type => 'Detect2Chars'
234 0 ▶ if ($self->testDetect2Chars($text, '{', '{', 0, 0, 0, undef, 0, 'Template', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "{", "{", 0, 0, 0, undef, 0, "Template", "Wiki-Tag")) 0 0 0
235 0 return 1
236 }
237 # attribute => 'Wiki-Tag'
238 # char => '['
239 # char1 => '['
240 # context => 'WikiLink'
241 # type => 'Detect2Chars'
242 0 ▶ if ($self->testDetect2Chars($text, '[', '[', 0, 0, 0, undef, 0, 'WikiLink', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "[", "[", 0, 0, 0, undef, 0, "WikiLink", "Wiki-Tag")) 0 0 0
243 0 return 1
244 }
245 # attribute => 'HTML-Entity'
246 # char => '&'
247 # char1 => ';'
248 # context => '#stay'
249 # type => 'RangeDetect'
250 0 ▶ if ($self->testRangeDetect($text, '&', ';', 0, 0, undef, 0, '#stay', 'HTML-Entity')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRangeDetect($text, "&", ";", 0, 0, undef, 0, "#stay", "HTML-Entity")) 0 0 0
251 0 return 1
252 }
253 # String => '<nowiki>'
254 # attribute => 'Wiki-Tag'
255 # context => 'NoWiki'
256 # type => 'StringDetect'
257 0 ▶ if ($self->testStringDetect($text, '<nowiki>', 0, 0, 0, undef, 0, 'NoWiki', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<nowiki>", 0, 0, 0, undef, 0, "NoWiki", "Wiki-Tag")) 0 0 0
258 0 return 1
259 }
260 # String => '<pre>'
261 # attribute => 'HTML-Tag'
262 # context => 'Pre'
263 # type => 'StringDetect'
264 0 ▶ if ($self->testStringDetect($text, '<pre>', 0, 0, 0, undef, 0, 'Pre', 'HTML-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<pre>", 0, 0, 0, undef, 0, "Pre", "HTML-Tag")) 0 0 0
265 0 return 1
266 }
267 # String => '[<][^>]+[>]'
268 # attribute => 'HTML-Tag'
269 # context => '#stay'
270 # type => 'RegExpr'
271 0 ▶ if ($self->testRegExpr($text, '[<][^>]+[>]', 0, 0, 0, undef, 0, '#stay', 'HTML-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[<][^>]+[>]", 0, 0, 0, undef, 0, "#stay", "HTML-Tag")) 0 0 0
272 0 return 1
273 }
274 # String => '[\s]'
275 # column => '0'
276 # context => 'Unformatted'
277 # type => 'RegExpr'
278 0 ▶ if ($self->testRegExpr($text, '[\\s]', 0, 0, 0, 0, 0, 'Unformatted', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\\s]", 0, 0, 0, 0, 0, "Unformatted", undef)) 0 0 0
279 0 return 1
280 }
281 # String => '[~]{3,4}'
282 # attribute => 'Wiki-Tag'
283 # context => '#stay'
284 # type => 'RegExpr'
285 0 ▶ if ($self->testRegExpr($text, '[~]{3,4}', 0, 0, 0, undef, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[~]{3,4}", 0, 0, 0, undef, 0, "#stay", "Wiki-Tag")) 0 0 0
286 0 return 1
287 }
288 # String => '[-]{4,}'
289 # attribute => 'Wiki-Tag'
290 # context => '#stay'
291 # type => 'RegExpr'
292 0 ▶ if ($self->testRegExpr($text, '[-]{4,}', 0, 0, 0, undef, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[-]{4,}", 0, 0, 0, undef, 0, "#stay", "Wiki-Tag")) 0 0 0
293 0 return 1
294 }
295 # attribute => 'Wiki-Tag'
296 # char => '!'
297 # column => '0'
298 # context => '#stay'
299 # type => 'DetectChar'
300 0 ▶ if ($self->testDetectChar($text, '!', 0, 0, 0, 0, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "!", 0, 0, 0, 0, 0, "#stay", "Wiki-Tag")) 0 0 0
301 0 return 1
302 }
303 0 return 0;
304 };
305  
306 0 ▶sub parseTemplate {
Subroutine parseTemplate: not called CC=3 SCAR=24.8
Pod undocumented
307 0 my ($self, $text) = @_;
308 # attribute => 'Wiki-Tag'
309 # char => '}'
310 # char1 => '}'
311 # context => '#pop'
312 # type => 'Detect2Chars'
313 0 ▶ if ($self->testDetect2Chars($text, '}', '}', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "}", "}", 0, 0, 0, undef, 0, "#pop", "Wiki-Tag")) 0 0 0
314 0 return 1
315 }
316 # attribute => 'Error'
317 # char => '''
318 # context => 'Error'
319 # type => 'DetectChar'
320 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Error', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "Error", "Error")) 0 0 0
321 0 return 1
322 }
323 0 return 0;
324 };
325  
326 0 ▶sub parseURL {
Subroutine parseURL: not called CC=3 SCAR=24.8
Pod undocumented
327 0 my ($self, $text) = @_;
328 # attribute => 'Wiki-Tag'
329 # char => ']'
330 # context => '#pop'
331 # type => 'DetectChar'
332 0 ▶ if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "]", 0, 0, 0, undef, 0, "#pop", "Wiki-Tag")) 0 0 0
333 0 return 1
334 }
335 # attribute => 'Error'
336 # char => '''
337 # context => 'Error'
338 # type => 'DetectChar'
339 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Error', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "Error", "Error")) 0 0 0
340 0 return 1
341 }
342 0 return 0;
343 };
344  
345 0 ▶sub parseUnformatted {
Subroutine parseUnformatted: not called CC=1 SCAR=6.9
Pod undocumented
346 0 my ($self, $text) = @_;
347 0 return 0;
348 };
349  
350 0 ▶sub parseWikiLink {
Subroutine parseWikiLink: not called CC=4 SCAR=30.0
Pod undocumented
351 0 my ($self, $text) = @_;
352 # attribute => 'Wiki-Tag'
353 # char => '|'
354 # context => '#stay'
355 # type => 'DetectChar'
356 0 ▶ if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "|", 0, 0, 0, undef, 0, "#stay", "Wiki-Tag")) 0 0 0
357 0 return 1
358 }
359 # attribute => 'Wiki-Tag'
360 # char => ']'
361 # char1 => ']'
362 # context => '#pop'
363 # type => 'Detect2Chars'
364 0 ▶ if ($self->testDetect2Chars($text, ']', ']', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "]", "]", 0, 0, 0, undef, 0, "#pop", "Wiki-Tag")) 0 0 0
365 0 return 1
366 }
367 # attribute => 'Error'
368 # char => '''
369 # context => 'Error'
370 # type => 'DetectChar'
371 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Error', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "Error", "Error")) 0 0 0
372 0 return 1
373 }
374 0 return 0;
375 };
376  
377 0 ▶sub parsecomment {
Subroutine parsecomment: not called CC=2 SCAR=17.9
Pod undocumented
378 0 my ($self, $text) = @_;
379 # String => '-->'
380 # attribute => 'Comment'
381 # context => '#pop'
382 # endRegion => 'comment'
383 # type => 'StringDetect'
384 0 ▶ if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "-->", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
385 0 return 1
386 }
387 0 return 0;
388 };
389  
390 0 ▶sub parsenormal {
Subroutine parsenormal: not called CC=16 SCAR=56.1
Pod undocumented
391 0 my ($self, $text) = @_;
392 # String => '<!--'
393 # attribute => 'Comment'
394 # beginRegion => 'comment'
395 # context => 'comment'
396 # type => 'StringDetect'
397 0 ▶ if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<!--", 0, 0, 0, undef, 0, "comment", "Comment")) 0 0 0
398 0 return 1
399 }
400 # String => '([=]{2,2}[^=]+[=]{2,2}|[=]{3,3}[^=]+[=]{3,3}|[=]{4,4}[^=]+[=]{4,4}|[=]{5,5}[^=]+[=]{5,5})'
401 # attribute => 'Section'
402 # column => '0'
403 # type => 'RegExpr'
404 0 ▶ if ($self->testRegExpr($text, '([=]{2,2}[^=]+[=]{2,2}|[=]{3,3}[^=]+[=]{3,3}|[=]{4,4}[^=]+[=]{4,4}|[=]{5,5}[^=]+[=]{5,5})', 0, 0, 0, 0, 0, '#stay', 'Section')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "([=]{2,2}[^=]+[=]{2,2}|[=]{3,3}[^=]+[=]{3,3}|[=]{4,4}[^=]+[=]{4,4}|[=]{5,5}[^=]+[=]{5,5})", 0, 0, 0, 0, 0, "#stay", "Section")) 0 0 0
405 0 return 1
406 }
407 # String => '[~]{3,4}'
408 # attribute => 'Wiki-Tag'
409 # context => '#stay'
410 # type => 'RegExpr'
411 0 ▶ if ($self->testRegExpr($text, '[~]{3,4}', 0, 0, 0, undef, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[~]{3,4}", 0, 0, 0, undef, 0, "#stay", "Wiki-Tag")) 0 0 0
412 0 return 1
413 }
414 # String => '[*#;:\s]*[*#:]+'
415 # attribute => 'Wiki-Tag'
416 # column => '0'
417 # context => '#stay'
418 # type => 'RegExpr'
419 0 ▶ if ($self->testRegExpr($text, '[*#;:\\s]*[*#:]+', 0, 0, 0, 0, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[*#;:\\s]*[*#:]+", 0, 0, 0, 0, 0, "#stay", "Wiki-Tag")) 0 0 0
420 0 return 1
421 }
422 # String => '[[](?![[])'
423 # attribute => 'Wiki-Tag'
424 # context => 'URL'
425 # type => 'RegExpr'
426 0 ▶ if ($self->testRegExpr($text, '[[](?![[])', 0, 0, 0, undef, 0, 'URL', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[[](?![[])", 0, 0, 0, undef, 0, "URL", "Wiki-Tag")) 0 0 0
427 0 return 1
428 }
429 # String => '(http:|ftp:|mailto:)[\S]*($|[\s])'
430 # attribute => 'URL'
431 # context => '#stay'
432 # type => 'RegExpr'
433 0 ▶ if ($self->testRegExpr($text, '(http:|ftp:|mailto:)[\\S]*($|[\\s])', 0, 0, 0, undef, 0, '#stay', 'URL')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(http:|ftp:|mailto:)[\\S]*(\$|[\\s])", 0, 0, 0, undef, 0, "#stay", "URL")) 0 0 0
434 0 return 1
435 }
436 # String => '[']{2,}'
437 # attribute => 'Wiki-Tag'
438 # context => '#stay'
439 # type => 'RegExpr'
440 0 ▶ if ($self->testRegExpr($text, '[\']{2,}', 0, 0, 0, undef, 0, '#stay', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[']{2,}", 0, 0, 0, undef, 0, "#stay", "Wiki-Tag")) 0 0 0
441 0 return 1
442 }
443 # attribute => 'Wiki-Tag'
444 # beginRegion => 'table'
445 # char => '{'
446 # char1 => '|'
447 # column => '0'
448 # context => 'Table'
449 # type => 'Detect2Chars'
450 0 ▶ if ($self->testDetect2Chars($text, '{', '|', 0, 0, 0, 0, 0, 'Table', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "{", "|", 0, 0, 0, 0, 0, "Table", "Wiki-Tag")) 0 0 0
451 0 return 1
452 }
453 # attribute => 'Wiki-Tag'
454 # char => '{'
455 # char1 => '{'
456 # context => 'Template'
457 # type => 'Detect2Chars'
458 0 ▶ if ($self->testDetect2Chars($text, '{', '{', 0, 0, 0, undef, 0, 'Template', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "{", "{", 0, 0, 0, undef, 0, "Template", "Wiki-Tag")) 0 0 0
459 0 return 1
460 }
461 # attribute => 'Wiki-Tag'
462 # char => '['
463 # char1 => '['
464 # context => 'WikiLink'
465 # type => 'Detect2Chars'
466 0 ▶ if ($self->testDetect2Chars($text, '[', '[', 0, 0, 0, undef, 0, 'WikiLink', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "[", "[", 0, 0, 0, undef, 0, "WikiLink", "Wiki-Tag")) 0 0 0
467 0 return 1
468 }
469 # attribute => 'HTML-Entity'
470 # char => '&'
471 # char1 => ';'
472 # context => '#stay'
473 # type => 'RangeDetect'
474 0 ▶ if ($self->testRangeDetect($text, '&', ';', 0, 0, undef, 0, '#stay', 'HTML-Entity')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRangeDetect($text, "&", ";", 0, 0, undef, 0, "#stay", "HTML-Entity")) 0 0 0
475 0 return 1
476 }
477 # String => '<nowiki>'
478 # attribute => 'Wiki-Tag'
479 # context => 'NoWiki'
480 # type => 'StringDetect'
481 0 ▶ if ($self->testStringDetect($text, '<nowiki>', 0, 0, 0, undef, 0, 'NoWiki', 'Wiki-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<nowiki>", 0, 0, 0, undef, 0, "NoWiki", "Wiki-Tag")) 0 0 0
482 0 return 1
483 }
484 # String => '<pre>'
485 # attribute => 'HTML-Tag'
486 # context => 'Pre'
487 # type => 'StringDetect'
488 0 ▶ if ($self->testStringDetect($text, '<pre>', 0, 0, 0, undef, 0, 'Pre', 'HTML-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<pre>", 0, 0, 0, undef, 0, "Pre", "HTML-Tag")) 0 0 0
489 0 return 1
490 }
491 # String => '[<][^>]+[>]'
492 # attribute => 'HTML-Tag'
493 # context => '#stay'
494 # type => 'RegExpr'
495 0 ▶ if ($self->testRegExpr($text, '[<][^>]+[>]', 0, 0, 0, undef, 0, '#stay', 'HTML-Tag')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[<][^>]+[>]", 0, 0, 0, undef, 0, "#stay", "HTML-Tag")) 0 0 0
496 0 return 1
497 }
498 # String => '[\s]'
499 # column => '0'
500 # context => 'Unformatted'
501 # type => 'RegExpr'
502 0 ▶ if ($self->testRegExpr($text, '[\\s]', 0, 0, 0, 0, 0, 'Unformatted', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\\s]", 0, 0, 0, 0, 0, "Unformatted", undef)) 0 0 0
503 0 return 1
504 }
505 0 return 0;
506 };
507  
508  
509 1 1;
510  
511 __END__
« Kate/JavaScript_PHP.pm ↑ Summary Kate/Convert/XMLData.pm »