fixes #6591: [perl] wrong coloring when space after regexp
This commit is contained in:
parent
7d0f18ab51
commit
570ae4fe26
3 changed files with 3348 additions and 4 deletions
|
@ -56,7 +56,7 @@
|
|||
<key>comment</key>
|
||||
<string>string.regexp.compile.perl</string>
|
||||
<key>end</key>
|
||||
<string>((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))</string>
|
||||
<string>((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|\s*$))</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -309,7 +309,7 @@
|
|||
<key>comment</key>
|
||||
<string>string.regexp.find-m.perl</string>
|
||||
<key>end</key>
|
||||
<string>((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))</string>
|
||||
<string>((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|\s*$))</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -595,7 +595,7 @@
|
|||
<key>comment</key>
|
||||
<string>string.regexp.replace.perl</string>
|
||||
<key>end</key>
|
||||
<string>((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)\]>]|$))</string>
|
||||
<string>((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)\]>]|\s*$))</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -1161,7 +1161,7 @@
|
|||
<key>contentName</key>
|
||||
<string>string.regexp.find.perl</string>
|
||||
<key>end</key>
|
||||
<string>((\1([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))</string>
|
||||
<string>((\1([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|\s*$))</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
|
31
extensions/perl/test/colorize-fixtures/test2.pl
Normal file
31
extensions/perl/test/colorize-fixtures/test2.pl
Normal file
|
@ -0,0 +1,31 @@
|
|||
die("[$sheet->{label}] Unexpected sheet format.") unless (
|
||||
$sheet->{"$date_col$row"} =~ /CALL_DATE/i &&
|
||||
$sheet->{"$pixel_cols[4]$row"} =~ /Home_Bind_Count/i
|
||||
);
|
||||
|
||||
$row++;
|
||||
while ($row < $sheet->{maxrow}) {
|
||||
$row++;
|
||||
$total_lines++;
|
||||
|
||||
my $date = $sheet->{"$date_col$row"};
|
||||
next unless $date;
|
||||
(warning "Unexpected date format: '$date'"), next unless ($date =~ /^2\d\d\d-\d\d-\d\d$/);
|
||||
|
||||
my $phone = trim($sheet->{"$phone_col$row"});
|
||||
(warning "Unexpected phone format: '$phone'."), next unless ($phone =~ /^\d{10}$/);
|
||||
|
||||
info $phone;
|
||||
next if ($date gt $date_to || $date lt $date_from);
|
||||
|
||||
my @pixels = (0) x 5;
|
||||
for (1..4) {
|
||||
$pixels[$_] = trim($sheet->{"$pixel_cols[4]$row"});
|
||||
(warning "Pixel $_ is not a number in the row # $row."), next unless looks_like_number($pixels[$_]);
|
||||
};
|
||||
|
||||
for (1..4) {
|
||||
add_phone_activity($date, $phone, "pixel-$_", $pixels[$_]) if $pixels[$_];
|
||||
};
|
||||
$parsed_lines++;
|
||||
};
|
3313
extensions/perl/test/colorize-results/test2_pl.json
Normal file
3313
extensions/perl/test/colorize-results/test2_pl.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue