mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 12:29:27 +01:00
Improved matching of tags in cc diff
to be less greedy
This commit is contained in:
parent
e6ae49fd4f
commit
cb74a9be1e
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 423,
|
BUILD_REVISION => 424,
|
||||||
BUILD_DATE => "2013-08-23",
|
BUILD_DATE => "2013-08-23",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ if($code =~ m/^\s*diff\s*$/i) {
|
|||||||
my $diff = word_diff \$last_code[1], \$last_code[0], { STYLE => 'MARKUP' };
|
my $diff = word_diff \$last_code[1], \$last_code[0], { STYLE => 'MARKUP' };
|
||||||
$diff =~ s/<del>([^\s]+)(\s+)<\/del>/<del>$1<\/del>$2/g;
|
$diff =~ s/<del>([^\s]+)(\s+)<\/del>/<del>$1<\/del>$2/g;
|
||||||
$diff =~ s/<ins>([^\s]+)(\s+)<\/ins>/<ins>$1<\/ins>$2/g;
|
$diff =~ s/<ins>([^\s]+)(\s+)<\/ins>/<ins>$1<\/ins>$2/g;
|
||||||
$diff =~ s/<del>(.*?)<\/del>\s*<ins>(.*?)<\/ins>/<replaced `$1` with `$2`>/g;
|
$diff =~ s/<del>((?:(?!<del>).)*)<\/del>\s*<ins>((?:(?!<ins>).)*)<\/ins>/<replaced `$1` with `$2`>/g;
|
||||||
$diff =~ s/<del>(.*?)<\/del>/<removed `$1`>/g;
|
$diff =~ s/<del>(.*?)<\/del>/<removed `$1`>/g;
|
||||||
$diff =~ s/<ins>(.*?)<\/ins>/<inserted `$1`>/g;
|
$diff =~ s/<ins>(.*?)<\/ins>/<inserted `$1`>/g;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user